242. Valid Anagram 242. Valid Anagram Anagram 有一個特性就是只要是 Anagram 每個字元的字數都會一樣多,因此一個解法是先計算出一個單字每個字元所出現的次數,接著是再見去另外一個單字,有出現的字元的字數。
1010. Pairs of Songs With Total Durations Divisible by 60 1010. Pairs of Songs With Total Durations Divisible by 60
49. Group Anagrams 49. Group Anagrams Anagram 的特性就是裡面的每個字元出現的頻率相同,如果經過排序的話,只要是 Anagram 就一定會一樣。 利用這個特性,
1170. Compare Strings by Frequency of the Smallest Character 1170. Compare Strings by Frequency of the Smallest Character class
220. Contains Duplicate III 220. Contains Duplicate III 超時 class Solution: def containsNearbyAlmostDuplicate(self,