Given two arrays g and s, where g[i] is the greed factor of the ith child and s[j] is the size of the jth cookie, return the maximum number of content children.
A child i is content if there exists a cookie j such that s[j] >= g[i] (the cookie size is at least as large as the child's greed factor). Each child can receive at most one cookie, and each cookie can be assigned to at most one child.
Example 1:
Input: g = [1, 2, 3], s = [1, 1]
Output: 1
Explanation: Only one child can be content. The child with greed factor 1 gets a cookie of size 1. The other two children cannot be satisfied.
Example 2:
Input: g = [1, 2], s = [1, 2, 3]
Output: 2
Explanation: Both children can be content. The child with greed factor 1 gets the cookie of size 1, and the child with greed factor 2 gets the cookie of size 2 (or 3).
Example 3:
Input: g = [1, 1], s = [2, 2]
Output: 2
Explanation: Both children have greed factor 1 and each cookie of size 2 satisfies them.
1 <= g.length <= 3 * 10⁴0 <= s.length <= 3 * 10⁴1 <= g[i], s[j] <= 2³¹ - 1