diff --git a/problems/0455.分发饼干.md b/problems/0455.分发饼干.md index ecf7f132..4814d414 100644 --- a/problems/0455.分发饼干.md +++ b/problems/0455.分发饼干.md @@ -134,22 +134,17 @@ class Solution { ``` Python: -```python +```python3 class Solution: def findContentChildren(self, g: List[int], s: List[int]) -> int: - #先考虑胃口小的孩子 g.sort() s.sort() - i=j=0 - count = 0 - while(i= g[res]: #小饼干先喂饱小胃口 + res += 1 + return res ``` - Go: Javascript: