Problem 455 · Easy

Assign Cookies

Maximize the number of content children, where each child needs a cookie at least as large as their greed factor and each cookie goes to at most one child. The visual pairs the least demanding remaining child with the smallest cookie that satisfies them.

Open the interactive visualisation