rewrite leetcode anagrams