时间复杂度 O(n)
空间复杂度 O(n)
anagram就是字符出现出现词数一样的单词。
利用hash map记录两个字符串中每个字符出现的词数
Last updated 3 years ago
Was this helpful?