summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--1_array_hashing/group_anagram.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/1_array_hashing/group_anagram.py b/1_array_hashing/group_anagram.py
index b4c788f..2276799 100644
--- a/1_array_hashing/group_anagram.py
+++ b/1_array_hashing/group_anagram.py
@@ -33,14 +33,14 @@ Constraints:
"""
from collections import defaultdict
-from typing import List
+from typing import Dict, List
class Solution:
def dictionary(self, strs: List[str]) -> List[List[str]]:
- res: dict = defaultdict(list)
+ res: Dict = defaultdict(list)
for s in strs:
- count = [0] * 26
+ count: List[int] = [0] * 26
for c in s:
count[ord(c) - ord("a")] += 1
res[tuple(count)].append(s)