Anagram inefficiently