class Solution(object):
def findContentChildren(self, g, s):
"""
:type g: List[int]
:type s: List[int]
:rtype: int
"""
g.sort()
s.sort()
j=0
p=0
l=len(g)
for i in s:
if j<l and g[j]<=i:
p+=1
j+=1
return p
leetcode分发饼干
猜你喜欢
转载自blog.csdn.net/weixin_45398265/article/details/105151302
今日推荐
周排行