sorting anagrams optimal