diff --git a/strings/check_anagrams.py b/strings/check_anagrams.py index 938bf4c2a..f652e2294 100644 --- a/strings/check_anagrams.py +++ b/strings/check_anagrams.py @@ -2,6 +2,7 @@ wiki: https://en.wikipedia.org/wiki/Anagram """ from collections import defaultdict +from typing import DefaultDict def check_anagrams(first_str: str, second_str: str) -> bool: @@ -29,7 +30,7 @@ def check_anagrams(first_str: str, second_str: str) -> bool: return False # Default values for count should be 0 - count = defaultdict(int) + count: DefaultDict[str, int] = defaultdict(int) # For each character in input strings, # increment count in the corresponding