Skip to content

Commit 9a32fae

Browse files
Solved LC242 - Anagram Check
1 parent 8262846 commit 9a32fae

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

strings/LC242_isAnagram/main.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# This is an exclusive problem only available in the Complete and Deluxe versions of this course.
22
# To learn more, visit https://kaeducation.com/lc-py.html
33

4-
class Solution:
4+
5+
class Solution(object):
56
def isAnagram(self, s, t):
7+
"""
8+
:type s: str
9+
:type t: str
10+
:rtype: bool
11+
"""
12+
13+
if len(s) != len(t):
14+
return False
15+
if sorted(s) == sorted(t):
16+
return True
17+
return False

0 commit comments

Comments
 (0)