Skip to content

Commit 8b97e42

Browse files
committed
[WHYjun] WEEK 01 solutions - (3/5)
1 parent 6b57ed3 commit 8b97e42

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

top-k-frequent-elements/WHYjun.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
class Solution:
22
def topKFrequent(self, nums: List[int], k: int) -> List[int]:
3-
# Time complexity: O(nlogn)
3+
# Time complexity: O(nlog(n))
44
# Space Complexity: O(n)
5-
5+
66
if len(nums) <= k:
77
return list(set(nums))
88

0 commit comments

Comments
 (0)