49. Group Anagrams(作业Anagram detection相同字母构成的字符串归类成字典)
6.1.11 Anagram detection
Design an efficient algorithm for finding all sets of anagrams in a large file such as a dictionary of English words [Ben00]. For example, eat, ate, and tea belong to one such a set.
Python
def presort(testDict):
pre_dict = []
原创
2021-05-06 23:04:33 ·
244 阅读 ·
0 评论