Working with stack doesn't work. Push down Automata is usefull in
checking if a given string in palindrom or not... But useless for
finding longest palindrom.

try on 'aabaabaabbaabbabba'  => baabbaab
                   |------------|

On Aug 31, 6:01 pm, ankur aggarwal <[email protected]> wrote:
> @abhijeet
> dryrun on this
>
> abbaabba
>
> On Mon, Aug 31, 2009 at 5:45 PM, Abhijeet Kumar
> <[email protected]>wrote:
>
>
>
> > u can push the string onto a stack ... so last element will be on top ...
> > den u can pop out element and compare ...
> > if u have 2 or more set of palindromes ..
> > u can keep a counter and keep a check on dat...- Hide quoted text -
>
> - Show quoted text -

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected]
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