Palindrome for your Dome
Description:
A palindrome is a word, phrase, number, or other sequence of symbols or elements, whose meaning may be interpreted the same way in either forward or reverse direction. Famous examples include "Amore, Roma", "A man, a plan, a canal: Panama" and "No 'x' in 'Nixon'". - wikipedia
Our goal is to determine whether or not a given string is a valid palindrome or not.
Like the above examples, here are a few test cases which are also populated:
"Amore, Roma" => valid
"A man, a plan, a canal: Panama" => valid
"No 'x' in 'Nixon'" => valid
"Abba Zabba, you're my only friend" => invalid
You can see that they are case insensitive and disregards non alphanumeric characters. In addition to a few predefined tests, your function will also be tested against a random string generator 50 times which are guaranteed to produce valid palindromes.
Notes:
The empty string ""
can be read forward or backward the same, it's a palindrome in our case.
Similar Kata:
Stats:
Created | Feb 19, 2014 |
Published | Feb 19, 2014 |
Warriors Trained | 5710 |
Total Skips | 971 |
Total Code Submissions | 17475 |
Total Times Completed | 3429 |
Ruby Completions | 960 |
JavaScript Completions | 2444 |
Haskell Completions | 116 |
Total Stars | 89 |
% of votes with a positive feedback rating | 93% of 317 |
Total "Very Satisfied" Votes | 278 |
Total "Somewhat Satisfied" Votes | 34 |
Total "Not Satisfied" Votes | 5 |