Algorithm · Databricks · Easy
Implement are_anagrams(a, b). Given two strings that contain only lowercase English letters (a through z), determine whether both strings are made up of exactly the same letters with identical occurrence counts. The order of letters does not matter, so a rearrangement of one string should be accepted as an anagram of the other. Two empty strings are considered anagrams of each other because both have empty frequency tables. The implementation should run in linear time…
Checking your access…