Skip to content

Commit 99cf2cc

Browse files
Fix build issues due to count (#5725)
* Fix build issues due to count * Update check_anagrams.py
1 parent 94f38dd commit 99cf2cc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

strings/check_anagrams.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
wiki: https://en.wikipedia.org/wiki/Anagram
33
"""
44
from collections import defaultdict
5+
from typing import DefaultDict
56

67

78
def check_anagrams(first_str: str, second_str: str) -> bool:
@@ -29,7 +30,7 @@ def check_anagrams(first_str: str, second_str: str) -> bool:
2930
return False
3031

3132
# Default values for count should be 0
32-
count = defaultdict(int)
33+
count: DefaultDict[str, int] = defaultdict(int)
3334

3435
# For each character in input strings,
3536
# increment count in the corresponding

0 commit comments

Comments
 (0)