Anagrams solution now sorts and dedupes.