Question
A phrase is a palindrome if, after converting all uppercase letters into lowercase letters and removing all non-alphanumeric characters, it reads the same forward and backward. Alphanumeric characters include letters and numbers.
Given a stringÂ
s
, returnÂtrue
 if it is a palindrome, orÂfalse
 otherwise.
This is antwo_pointers question.
Idea
Normalize the given string (only alpha numeric chars, remove whitespace, all lowercase), then start two points at the beginning and end of the string, as you move the pointers closer to each other, check for equality.