What did you learn? Frequency maps turn "same elements, different order" problems into "same counts" problems.
Early termination (length check) saves time on obvious non-matches.
For fixed alphabets (like lowercase English), an array of size 26 is faster than a hash map. But hash maps work for any character set. This pattern extends to "permutation in string," "find all anagrams," and similar problems.