#C4258. Valid Palindrome Checker
Valid Palindrome Checker
Valid Palindrome Checker
This problem requires you to determine whether a given string is a valid palindrome. A palindrome is a string that reads the same forward and backward when all non-alphanumeric characters are ignored and case is not considered. Formally, if we filter the input string s to only include alphanumeric characters and convert them to lowercase, the string is a palindrome if
$$ filtered\_s = reverse(filtered\_s) $$
For example, "A man, a plan, a canal: Panama" is a palindrome whereas "race a car" is not.
inputFormat
Input is provided from stdin as a single line containing a string s. The string may contain spaces, punctuation, and can be empty.
outputFormat
Output to stdout a single line: True
if the processed string is a palindrome, otherwise False
.
A man, a plan, a canal: Panama
True