Skip to content

Commit bfebdd2

Browse files
committed
feat: slice 삭제
1 parent 1d00102 commit bfebdd2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

top-k-frequent-elements/hwanmini.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ var topKFrequent = function(nums, k) {
2424
result.push(...buckets[i]);
2525
}
2626

27-
return result.slice(0, k);
28-
27+
return result
2928
};
3029

3130
console.log(topKFrequent([1,1,1,2,2,3],2))

0 commit comments

Comments
 (0)