Possible Duplicate:
Algorithm to find palindromes
How do I find all palindromes in a string like:
"AA BB AA TTT AA BB"
I know how to find palindromes in a single string and if I merge these strings by removing the " " character, I can still find the palindromes...but if I do so, how do I reconstruct the original words....
Or is there any other approach which may take less time...Any clue..?