Each child has a greed factor. Each cookie has a size. A child is satisfied if they get a cookie with size at least their greed. Maximize satisfied children. For and , answer is . Only one child can be satisfied.
Here's a classic matching problem.
Think about which child to satisfy first with which cookie.