Decision Point's QA validation utilities need to identify whether an input string is a palindrome. Implement a function that compares the string case-insensitively while ignoring spaces, punctuation, and other non-alphanumeric characters.
Use a two-pointer approach so the function runs in linear time and uses constant auxiliary space. An empty string after normalization is considered a palindrome.
s, a string containing letters, digits, whitespace, and punctuation.True if the normalized string reads identically from left to right and right to left. Otherwise, return False.def is_palindrome(s):