> For the complete documentation index, see [llms.txt](https://851958789.gitbook.io/notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://851958789.gitbook.io/notes/0242_valid_anagram/slt.md).

# Solution1  hash map

* 时间复杂度 O(n)
* 空间复杂度 O(n)

anagram就是字符出现出现词数一样的单词。

利用hash map记录两个字符串中每个字符出现的词数
