Given the string a, find the longest palindromic sub-string b.
So when
a = 'xkayakyy';
you should return
b = 'kayak';
Solution Stats
Problem Comments
3 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers1668
Suggested Problems
-
Extract leading non-zero digit
2253 Solvers
-
Back to basics 13 - Input variables
395 Solvers
-
Numbers with prime factors 2, 3 and 5.
683 Solvers
-
Try 1.5.4: Celsius to Fahrenheit
873 Solvers
-
Sum of first n positive integers
629 Solvers
More from this Author96
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
This needs a richer test suite, as the leading solution at the time of this comment is just a lookup table.
You should add testcases where the palindrome is in the 2nd half of the word. Cause then my solution wouldnt work and i had to come up with something else.^^
Useful!