Skip to content

Commit 561a161

Browse files
authoredAug 11, 2023
Merge pull request #2807 from ZaprostoNeprosto/fix-if-condition-duplication
Update 0347-top-k-frequent-elements.js
2 parents 4683206 + 7c6f0b2 commit 561a161

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed
 

Diff for: ‎javascript/0347-top-k-frequent-elements.js

-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ var topKFrequent = function(nums, k) {
5454
if (k < 1) break;
5555
if (el) {
5656
for (let el2 of el) {
57-
if (k < 1) break;
5857
ans.push(el2);
5958
k--;
6059
}

0 commit comments

Comments
 (0)