Skip to content

Commit 71ff8e8

Browse files
committed
Sort easy
1 parent 52ad4cf commit 71ff8e8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

ttop5/Sort/242.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
class Solution(object):
2+
3+
def isAnagram(self, s, t):
4+
"""
5+
:type s: str
6+
:type t: str
7+
:rtype: bool
8+
题意:s是否为t字母颠倒而构成(即比较两个字符串中的组成元素相同即可)
9+
"""
10+
return sorted(s) == sorted(t)

0 commit comments

Comments
 (0)