Simple palindrome
Input
'racecar'
Output
True
The string "racecar" reads the same forwards and backwards.
Full lesson preview
Determine whether a string reads the same forwards and backwards, ignoring non-alphanumeric characters and case.
Problem statement
Task
Examples
Input
'racecar'
Output
True
The string "racecar" reads the same forwards and backwards.
Input format
Output format
Constraints
Samples
Input
"A man a plan a canal Panama"
Output
True
Ignoring spaces and case, it's a palindrome.