Valid Palindrome
Examples
Example 1:
Input: s = "Was it a car or a cat I saw?"
Output: true
Explanation:
Example 2:
Input: s = "tab a cat"
Output: false
Explanation:
Example 1:
Input: s = "Was it a car or a cat I saw?"
Output: true
Explanation:
Example 2:
Input: s = "tab a cat"
Output: false
Explanation:
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).
After considering only alphanumerical characters we have "wasitacaroracatisaw", which is a palindrome.
"tabacat" is not a palindrome.
1 <= s.length <= 1000s is made up of only printable ASCII characters.