Assign Cookies LeetCode solution in Python
1# Runtime: 437 ms (Top 8.80%) | Memory: 15.9 MB (Top 13.77%)2class Solution:3def findContentChildren(self, g: List[int], s: List[int]) -> int:4g.sort()5s.sort()6cont = 07c = 08k = 09while k < len(s) and c < len(g):10if s[k] >= g[c]:11c += 112k += 113cont += 114else:15k += 116return cont