Skip to main content

Check String for Palindrome

JUNIOR

Check String for Palindrome

Check if a string is a palindrome.

Requirements:

  • Palindrome reads same forwards and backwards
  • Ignore case, spaces, and non-alphanumeric characters
  • Return true if palindrome, false otherwise

Example:

Input: "A man, a plan, a canal: Panama"
Output: true

Input: "race a car"
Output: false

Examples:

Input 1:{"s":"A man, a plan, a canal: Panama"}
Output 1:true
Input 2:{"s":"race a car"}
Output 2:false

Loading editor...

Run your code to see results

Click the Run button above