Anagram check

Write codeEasy12 min

Your task

Given two lowercase strings a and b, return True if they are anagrams of each other (same letters with the same multiplicities) and False otherwise. Solve it using character counts, not by sorting. Both strings contain only lowercase letters and may be empty.

Examples

are_anagrams(a: str, b: str) -> bool
Example 1
Inputare_anagrams("listen", "silent")
OutputTrue