diff options
Diffstat (limited to '1_array_hashing/top_k_elements.py')
| -rw-r--r-- | 1_array_hashing/top_k_elements.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/1_array_hashing/top_k_elements.py b/1_array_hashing/top_k_elements.py index 13833f2..2539caa 100644 --- a/1_array_hashing/top_k_elements.py +++ b/1_array_hashing/top_k_elements.py @@ -50,7 +50,7 @@ class Solution: List[int]: elements list """ count = {} - freq = [[] for i in range(len(nums) + 1)] + freq = [[] for _ in range(len(nums) + 1)] for n in nums: count[n] = 1 + count.get(n, 0) |
