Leetcode 455. Assign Cookies
Given arrays g (children's greed) and s (cookie sizes), assign at most one cookie per child so that s[j] >= g[i] and maximize the number of content children. This is a greedy matching problem typically solved by sorting both arrays and using a two‑pointer scan to pair smallest sufficient cookies to children.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.