Bug Report for https://neetcode.io/problems/is-palindrome
based on my submissions, it should be wrong right? i don't add case for number but its still accepted
class Solution:
def isPalindrome(self, s: str) -> bool:
left = 0
right = len(s) - 1
lc_s = s.lower()
while left < right:
if ord(lc_s[left]) < 97 or ord(lc_s[left]) > 122:
left += 1
elif ord(lc_s[right]) < 97 or ord(lc_s[right]) > 122:
right -= 1
elif ord(lc_s[left]) != ord(lc_s[right]):
return False
else:
left += 1
right -= 1
return True
I think the neetcode team need to add some usecase for that
Bug Report for https://neetcode.io/problems/is-palindrome
based on my submissions, it should be wrong right? i don't add case for number but its still accepted
I think the neetcode team need to add some usecase for that