Bloomberg interview question

Group strings in vector by anagrams