mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-01-31 06:33:44 +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
|
||||
"""
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue
Block a user