Problem 42461. This is a palindrome and so am I
A palindrome is a sequence of characters which reads the same backward or forward, for instance
'a man a plan a canal panama'
is a palindrome. Write a function that,
a) given a string input, returns true or false depending on whether this string is a palindrome (up to white-spaces) or not.
b) The function's source code must be a palindrome.
Solution Stats
Problem Comments
-
2 Comments
kinda cheating if you allow comments lines as part of the palindrome
Not really. The definition of palindrome does not require that letters or words have some special meaning besides their order. Moreover, the problem author adds a comment section to the default solution that tips using comments as an expected kind of behavior. Finally, all valid solutions to this problem so far use comments except people that identify their own file and mark it as valid palindrome or use some hack (and that's cheating.)
Solution Comments
Show commentsProblem Recent Solvers34
Suggested Problems
-
Determine whether a vector is monotonically increasing
20756 Solvers
-
Find the numeric mean of the prime numbers in a matrix.
8909 Solvers
-
Given an unsigned integer x, find the largest y by rearranging the bits in x
1820 Solvers
-
Volume of a sphere given its surface area
148 Solvers
-
Number of odd and even elements within matrix
149 Solvers
More from this Author7
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!