class Solution:
def findContentChildren(self, g: List[int], s: List[int]) -> int:
g.sort()
s.sort()
count=0
for i in g:
for j in s:
if i<=j:
count=count+1
s.remove(j)
break
return count
Leetcode 455[简单]分发饼干
最新推荐文章于 2022-03-22 21:50:55 发布