You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#APPROACH : This code defines a function to check if a string is a palindrome by removing non-alphanumeric characters and comparing the reversed string.
class Solution:
def isPalindrome(self, s: str) -> bool:
# Convert to lowercase and remove non-alphanumeric characters