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 119514c commit a302fffCopy full SHA for a302fff
valid-palindrome/jeldo.py
@@ -0,0 +1,5 @@
1
+class Solution:
2
+ # O(n)
3
+ def isPalindrome(self, s: str) -> bool:
4
+ s = ''.join(ch.lower() for ch in s if ch.isalnum()) # O(n)
5
+ return s == s[::-1] # O(n)
0 commit comments