class Solution(object):
def findContentChildren(self, g, s):
g.sort()
s.sort()
i, j = 0, 0
while i < len(g) and j < len(s):
if s[j] >= g[i]:
i += 1
j += 1
return i
Simple Python Solution

@lilixu one flaw here, because you are an awesome parent, you should assign as big cookies as possible. So I think you should assign cookies in reverse order, though the result is the same. Below is my solution.
class Solution(object): def findContentChildren(self, g, s): g.sort() s.sort() i,j = len(g)1,len(s)1 count = 0 while (i>=0 and j>=0): if g[i] <= s[j]: count += 1 i=1 j=1 else: i = 1 return count