Alphanumeric Palindrome
Return True if text reads the same forwards and backwards after removing every character that is not a letter or digit and ignoring case.
Requirements
- Use two pointers and extra space.
Examples
EXAMPLE WALKTHROUGHclassic sentence
A guided view of the published example, not a trace of your code.
INPUT
["A man, a plan, a canal: Panama"]TASKalphanumeric_palindrome()
EXPECTED OUTPUT
trueStart with the input values shown in this example.
Example 1 of 3
Input: text = "A man, a plan, a canal: Panama"
Output: true
Explanation: classic sentence
Input: text = "race a car"
Output: false
Explanation: not a palindrome
Input: text = " "
Output: true
Explanation: only spaces
Hint 1
Move a left pointer and a right pointer towards each other, skipping non-alphanumeric characters.