We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 489033d commit e645851Copy full SHA for e645851
valid-palindrome/changhyumm.py
@@ -0,0 +1,11 @@
1
+class Solution:
2
+ def isPalindrome(self, s: str) -> bool:
3
+ # 시간복잡도 O(n)
4
+ # loop
5
+ s_list = [x.lower() for x in s if x.isalnum()]
6
7
+ # loop + list pop()
8
+ for i in range(len(s_list)//2):
9
+ if s_list[i] != s_list.pop():
10
+ return False
11
+ return True
0 commit comments