Assign cookies to children where each child needs minimum greed factor. Maximize satisfied children.
Sort both arrays. Use two pointers: try to satisfy each child with the smallest sufficient cookie.
- Sort greed array g and size array s
- Use pointer i for children, j for cookies
- If s[j] >= g[i], satisfy child i and advance both pointers
- Otherwise advance j only
- Return i (satisfied count)
- Time Complexity: O(n log n)
- Space Complexity: O(1)