Skip to content

Commit 7c6f0b2

Browse files
Update 0347-top-k-frequent-elements.js
Removed useless condition. This condition is already handled on line 54.
1 parent 704285e commit 7c6f0b2

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

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)