[Haskell-beginners] Longest palindrome

Lyndon Maydwell maydwell at gmail.com
Mon Oct 11 13:54:23 EDT 2010


Hi Café.

I've been looking at implementing the following algorithm in haskell.

Take the maximum length palindrome from the list of palindromes
generated from the original list by:
Taking each element as a starting point, then expanding either side
while the string is still a palindrome.

I could do this numerically after generating an array from a list, but
I was wondering if there was a more idiomatic way to go about it.


More information about the Beginners mailing list