Bloomberg interview question

A function to check if a given string is an anagram.