CTCI 11.2 sort anagrams