Create a MATLAB function that checks whether a given string is a palindrome or not. A palindrome is a word, phrase, number, or other sequence of characters that reads the same forward and backward, ignoring spaces, punctuation, and capitalization.
Solution Stats
Problem Comments
2 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers45
Suggested Problems
-
Return the 3n+1 sequence for n
8513 Solvers
-
Determine if a Given Number is a Triangle Number
400 Solvers
-
Project Euler: Problem 10, Sum of Primes
2126 Solvers
-
Construct an index vector from two input vectors in vectorized fashion
460 Solvers
-
Right Triangle Side Lengths (Inspired by Project Euler Problem 39)
2120 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
A lot of solutions are passing this due to insufficient testing. There is only one number in the tests and it's a 'pass', so solutions that remove all numbers from the input are passing because a null string counts as a palindrome.
Test suite has been updated to cover sufficient cases.
Though I was going to include cases with characters (as specified in the problem description), however as the reference solution provieded failed for such cases, I didn't proceed with it.