Author |
Topic: Add something to make a word palindrome (Read 904 times) |
|
Ved
Junior Member
Gender:
Posts: 53
|
|
Add something to make a word palindrome
« on: Apr 8th, 2010, 10:49pm » |
Quote Modify
|
We need to find what needs to be added to make a word palindrome. eg : MALAYAL will need AM to be added.
|
|
IP Logged |
|
|
|
towr
wu::riddles Moderator Uberpuzzler
Some people are average, some are just mean.
Gender:
Posts: 13730
|
|
Re: Add something to make a word palindrome
« Reply #1 on: Apr 9th, 2010, 12:45am » |
Quote Modify
|
You could make a suffix tree and look for the longest prefix in the reverse string; add what's left after that prefix. But please don't ask me how to make a suffix tree.
|
|
IP Logged |
Wikipedia, Google, Mathworld, Integer sequence DB
|
|
|
|