fix generate_anagrams
fix k_frequent