leetle

Daily challenge for 2025-10-06

279. Assign Cookies

Assume you are an awesome parent and want to give your children some cookies. Each child i has a greed factor g[i], and each cookie j has a size s[j]. If s[j] >= g[i], you can assign the cookie j to child i, and the child will be content. Your goal is to maximize the number of content children and return that number.

Example:
Input: g = [1,2,3], s = [1,1]
Output: 1

Run this challenge interactively in Python or JavaScript when the app loads.