Skip to content

Commit 41b2086

Browse files
committed
docs: add space complexity of Tim-sort
1 parent 3cd41b5 commit 41b2086

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

top-k-frequent-elements/Chaedie.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
1414
Space Complexity:
1515
1. dictionary for counting frequency of nums -> O(n)
16-
2. sorted List -> O(n)
16+
2. Timsort's space overhead -> O(n)
17+
3. sorted List -> O(n)
1718
1819
Space complexity of this solution is O(n)
1920
"""

0 commit comments

Comments
 (0)