A phrase is a palindrome if, after converting all uppercase to lowercase and removing all non-alphanumeric characters, it reads the same forwards and backwards.
Given a string s, return true if it is a palindrome, false otherwise.
Example 1:
Input: A man a plan a canal Panama Output: true
Example 2:
Input: race a car Output: false
Constraints:
- 1 ≤ s.length ≤ 2 × 10⁵
- s consists only of printable ASCII characters
Input format: One line — the string (spaces included).
Output format: true or false