mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-03-27 00:46:43 +00:00
Fix build issues due to count (#5725)
* Fix build issues due to count * Update check_anagrams.py
This commit is contained in:
parent
94f38dd88c
commit
99cf2cc1c5
@ -2,6 +2,7 @@
|
|||||||
wiki: https://en.wikipedia.org/wiki/Anagram
|
wiki: https://en.wikipedia.org/wiki/Anagram
|
||||||
"""
|
"""
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
|
from typing import DefaultDict
|
||||||
|
|
||||||
|
|
||||||
def check_anagrams(first_str: str, second_str: str) -> bool:
|
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
|
return False
|
||||||
|
|
||||||
# Default values for count should be 0
|
# Default values for count should be 0
|
||||||
count = defaultdict(int)
|
count: DefaultDict[str, int] = defaultdict(int)
|
||||||
|
|
||||||
# For each character in input strings,
|
# For each character in input strings,
|
||||||
# increment count in the corresponding
|
# increment count in the corresponding
|
||||||
|
Loading…
x
Reference in New Issue
Block a user