summaryrefslogtreecommitdiff
path: root/1_array_hashing/top_k_elements.py
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2024-09-24 04:50:56 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2024-09-24 04:50:56 +0900
commitbfee35a21c60e062c0033ba4e7e032b86dcadf7c (patch)
tree2767d6dc45ff8b13a5b4cc6a790f5b38bd038268 /1_array_hashing/top_k_elements.py
parent8a77bd0cf92a726f186cd7490f7ed6a94b936fab (diff)
Init
Diffstat (limited to '1_array_hashing/top_k_elements.py')
-rw-r--r--1_array_hashing/top_k_elements.py2
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)