We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f00889 commit eca0d9cCopy full SHA for eca0d9c
problems/455.AssignCookies.md
@@ -96,14 +96,14 @@ Python Code:
96
from typing import *
97
class Solution:
98
def findContentChildren(self, g: List[int], s: List[int]) -> int:
99
- g.sort(reverse=True)
100
- s.sort(reverse=True)
+ g.sort()
+ s.sort()
101
count=gIdx=sIdx=0
102
while gIdx<len(g) and sIdx<len(s):
103
if s[sIdx]>=g[gIdx]:
104
- sIdx+=1
+ gIdx+=1
105
count+=1
106
- gIdx+=1
+ sIdx+=1
107
return count
108
```
109
0 commit comments