Greedy Algorithms

Sample Problem You are given two integer arrays: greeds , where greeds[i] represents the minimum size of a cookie that a child needs to to be satisfied. cookies , where cookies[j] represents the size of a cookie. Assign cookies such that as many children as possible are satisfied. Each child can receive at most one cookie, and each cookie can be given to only one child. A Greedy Algorithm def…