提交 467c5847 编写于 作者: K KEQI HUANG 提交者: GitHub

Update 242._valid_anagram.md

上级 668bb9a4
......@@ -9,6 +9,17 @@
对Python来说,又是一块蛋糕,基本不本地测试
就是这么自信
我的一行解法:
```python
class Solution(object):
def isAnagram(self, s, t):
"""
:type s: str
:type t: str
:rtype: bool
"""
return len(s) == len(t) and collections.Counter(s) == collections.Counter(t)
```
```
class Solution(object):
......@@ -27,7 +38,6 @@ class Solution(object):
作弊神奇python大法,看了看别人的解法,用字数统计,因为只可能是26个字母
然后发现作弊大法居然更快
```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册