improved top-k

This commit is contained in:
Sangeeth Sudheer 2022-04-21 15:14:12 +05:30
parent 7386344b2e
commit d86e3334b1
1 changed files with 1 additions and 6 deletions

View File

@ -36,11 +36,6 @@ class Solution:
# Possible that we filled k elements already in this inner # Possible that we filled k elements already in this inner
# loop, so get out # loop, so get out
if len(result) == k: if len(result) == k:
break return result
if len(result) == k:
break
j -= 1 j -= 1
return result