Skip to content

Commit d7dc738

Browse files
authored
Update 347-Top-k-frequent-elements.py
1 parent 52bdc09 commit d7dc738

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/347-Top-k-frequent-elements.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def topKFrequent(self, nums: List[int], k: int) -> List[int]:
1212
for i in range(len(freq) - 1, 0, -1):
1313
for n in freq[i]:
1414
res.append(n)
15-
if len(res) == k:
16-
return res
15+
if len(res) == k:
16+
return res
1717

1818
# O(n)

0 commit comments

Comments
 (0)