You have children with greed factors and cookies with sizes. A child is content if they get a cookie of size at least . Each cookie can go to at most one child. Maximize the number of content children.
Example: children greed = [1, 2, 3], cookies = [1, 1]. Answer: . Only the child with greed can be satisfied. Here's your entry problem for greedy. Before reading the solution, try to answer: what should you sort by? Which child should get which cookie?