Palindrome
Description
Fix the incorrect code to pass all the test cases.
Given a string s, return true if it is a palindrome, otherwise return false.
A palindrome is a string that reads the same forward and backward.
It is also case-insensitive and ignores all non-alphanumeric characters.
Note: Alphanumeric characters consist of letters (A-Z, a-z) and numbers (0-9).
-
s = A man, a plan, a canal: Panama
expected = True
-
s = race a car
expected = False
-
s =
expected = True
-
s = 0P
expected = False
-
s = abba
expected = True
-
s = abcba
expected = True
-
s = No 'x' in Nixon
expected = True
-
s = .,,
expected = True
-
s = a.
expected = True
-
s = Àbbà
expected = False
-
s = åböbå
expected = True
-
s = 123321
expected = True
-
s = 123421
expected = False
-
s = Able was I ere I saw Elba
expected = True