#Approach one :O(nlogn)--greedy solution
def findContentChildren(self, g, s):
"""
:type g: List[int]
:type s: List[int]
:rtype: int
"""
g.sort()
s.sort()
childindex = 0
cookieindex = 0
while cookieindex < len(s) and childindex < len(g):
if s[cookieindex] >= g[childindex]:
childindex += 1
cookieindex += 1
return childindex