Why should "A man, a plan, a canal: Panama" return true?
Practice this question from Valid Palindrome - Two pointers Pattern Practice Quiz, with options and an explanation.
Question
Why should "A man, a plan, a canal: Panama" return true?
Option A — Correct answer
The normalized string is a palindrome
Option B
The original punctuation is symmetric
Option C
It has exactly five words
Option D
It contains uppercase letters
Explanation
After normalization, the string reads the same forward and backward.