<\/span><\/h2>\n\n\n\nAssume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie.<\/p>\n\n\n\n
Each child i<\/strong> has a greed factor g[i]<\/strong>, which is the minimum size of a cookie that the child will be content with; and each cookie j<\/strong> has a size s[j]<\/strong>. If s[j] >= g[i]<\/strong>, we can assign the cookie j<\/strong> to the child i<\/strong>, and the child i<\/strong> will be content. Your goal is to maximize the number of your content children and output the maximum number.<\/p>\n\n\n\n<\/div>\n\n\n\n