Group words into anagram lists | Bloomberg Interview Question