Sort both arrays. Two pointers to match.
def findContentChildren(g, s): g.sort() s.sort() child = cookie = 0
while child < len(g) and cookie < len(s):
if s[cookie] >= g[child]:
child += 1
cookie += 1
return child
time, extra space.