Skip to content

Commit

Permalink
Fix build issues due to count (TheAlgorithms#5725)
Browse files Browse the repository at this point in the history
* Fix build issues due to count

* Update check_anagrams.py
  • Loading branch information
Rohanrbharadwaj authored Oct 31, 2021
1 parent 94f38dd commit 99cf2cc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion strings/check_anagrams.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 99cf2cc

Please sign in to comment.