Given the string a, find the longest palindromic sub-string b.
a = 'xkayakyy';
you should return
b = 'kayak';
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.^^
Better than lookup, worse than finding maximum palindrom.
This ought to be the leading solution.
mine is dump but good for my eyes + brain, :)
What's the point in even making these non-solutions?
If no solution then non-solution is solution :)
Given an unsigned integer x, find the largest y by rearranging the bits in x
Back to basics 9 - Indexed References
Generate a vector like 1,2,2,3,3,3,4,4,4,4
Create an index-powered vector
Make a half wave rectifier
Sort a list of complex numbers based on far they are from the origin.
Calculate the Levenshtein distance between two strings
Tic Tac Toe FTW
Make a checkerboard matrix
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office