Assign Cookies
Easy
Greedy
Each child i has a greed factor g[i] (minimum cookie size that satisfies them) and each cookie j has a size s[j]. A cookie can go to at most one child. Print the maximum number of children that can be satisfied.
Constraints
1 <= n, m <= 3 * 10^4 1 <= g[i], s[j] <= 2^31 - 1
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.