>Are you really sure that your assumption is correct?

Yes, I'm sure. I solved this problem during the actual online contest at
UVa.

>I am not sure about the fact that you can take sub strings from the word by
>removing characters from between them...
>AAM is certainly not valid sub string for this case as far as my
>understanding of the problem stands.

Here's what the problem says,

"From any non-palindromic string, you can always take away some letters, and
get a palindromic subsequence."

It does not mention the word 'substring' anywhere in the problem statement, 
but it does talk about subsequences.
And it does not say anywhere that the letters we are taking away have to be 
from the end or the beginning.
Think about the differenrence between substrings and subsequences. If you 
only check the substrings,
you are bound to get a wrong answer. Your understanding of the word 
'substring' is correct,
but the question asks that we check all subsequences.

Muntasir


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to