Skip to content

Commit 9a56411

Browse files
committed
valid-anagram solution
1 parent 4b6be95 commit 9a56411

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
class Solution:
2+
def isAnagram(self, s: str, t: str) -> bool:
3+
# ์• ๋„ˆ๊ทธ๋žจ์€ ์›๋ž˜์˜ ๋ชจ๋“  ๊ธ€์ž๋ฅผ ์ •ํ™•ํžˆ ํ•œ ๋ฒˆ ์‚ฌ์šฉํ•˜์—ฌ ๋‹ค๋ฅธ ๋‹จ์–ด๋‚˜ ๊ตฌ์ ˆ์˜ ๊ธ€์ž๋ฅผ ์žฌ๋ฐฐ์—ดํ•˜์—ฌ ํ˜•์„ฑ๋œ ๋‹จ์–ด๋‚˜ ๊ตฌ์ ˆ์ž…๋‹ˆ๋‹ค.
4+
return sorted(s) == sorted(t)
5+

0 commit comments

Comments
ย (0)