From a1b80e66b43ed77c34357af31686697322421995 Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Mon, 26 Aug 2024 13:16:16 +0900 Subject: Init --- 1_array_hashing/group_anagram.py | 6 +++--- 1 file 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) -- cgit v1.2.3