Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build issues due to count #5725

Merged
merged 2 commits into from
Oct 31, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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