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 a157c44 commit eba954eCopy full SHA for eba954e
valid-palindrome/kayden.py
@@ -0,0 +1,25 @@
1
+# 시간복잡도: O(N)
2
+# 공간복잡도: O(N)
3
+class Solution:
4
+
5
+ def isPalindrome(self, s: str) -> bool:
6
+ string = ""
7
8
+ for letter in s:
9
+ if letter.isalnum():
10
+ string += letter.lower()
11
12
13
+ def valid(s):
14
+ st, en = 0, len(s)-1
15
16
+ while st < en:
17
+ if s[st] != s[en]:
18
+ return False
19
20
+ st += 1
21
+ en -= 1
22
23
+ return True
24
25
+ return valid(string)
0 commit comments