def check_anagram(str1: str, str2: str) ->bool:
    """
    LeetCode 242: Valid Anagram
    Given two strings str1 and str2 , write a function to determine if str2 is an anagram of str1.
    todo compare speeds
    """
    if len(str1) != len(str2):
        return False
    for c in set(str1):
        if str1.count(c) != str2.count(c):
            return False
    return True
