A phrase is a palindrome if, after converting all uppercase letters into lowercase letters and removing every non-alphanumeric character, it reads the same forward and backward.
Given a string s, return true when it is a palindrome and false otherwise.
Inputs = "A man, a plan, a canal: Panama"
Outputtrue
Removing spaces and punctuation and using lowercase gives amanaplanacanalpanama, which reads the same in both directions.
Inputs = "race a car"
Outputfalse
Removing spaces gives raceacar. Its middle characters are e and a, which do not match.
1 ≤ s.length ≤ 200,000s contains printable ASCII characters.