Skip to content

Commit 0dbfa7e

Browse files
author
sejineer
committed
valid-palindrome solution
1 parent 47d1e92 commit 0dbfa7e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

valid-palindrome/sejineer.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
"""
2+
시간 복잡도: O(N)
3+
공간 복잡도: O(N)
4+
"""
5+
class Solution:
6+
def isPalindrome(self, s: str) -> bool:
7+
filterd_s = [ch for ch in s.lower() if ch.isalnum()]
8+
return filterd_s == filterd_s[::-1]

0 commit comments

Comments
 (0)