69. Palindrome String
Core1000 ms256 MBSolved by 0%
Read one line and print Yes if it reads the same forwards and backwards,
or No otherwise.
Ignore case, spaces and punctuation — compare only the letters and digits. So
A man, a plan, a canal: Panama is a palindrome.
Constraints - The line has between 1 and 100000 characters. - Printable ASCII only.
Input
A single line of text.
Output
Print exactly one word: Yes or No.
Inputracecar
OutputYes
Noteis a simple palindrome
InputA man, a plan, a canal: Panama
OutputYes
Noteis a palindrome only once case and punctuation are ignored
Hint 1Approach
Hint 2Approach
Hint 3Pseudocode
Hint 4Full solution