Does the question mean non-continuous substring? I think it should be
continuous substring which is palindrome with in the given string. LCS
wouldn't solve problem in this case.

On Wed, Jun 22, 2011 at 10:29 PM, sunny agrawal <[email protected]>wrote:

> LCS is abcdcba or abcecba
> not abc or cba
>
>
> On Wed, Jun 22, 2011 at 10:15 PM, ankit mehta <[email protected]>wrote:
>
>> Consider string: abcdecba
>> Reverse of above string: abcedcba
>> Longest common substring: abc and cba : Both not Palindromes!
>>
>> On Jun 22, 9:29 pm, sanjay ahuja <[email protected]> wrote:
>> > Suffix tree can solve longest common substring problem in o(n)
>> > and longest palindrome in string S is nothing but longest common
>> > substring between string s and its reverse.
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > On Wed, Jun 22, 2011 at 9:31 PM, ankit mehta <[email protected]>
>> wrote:
>> > > You dont have to create longest palindrome, you have to find the
>> > > longest palindrome.
>> >
>> > > On Jun 22, 7:19 pm, SVIX <[email protected]> wrote:
>> > >> couldn't we just collect all the letters that occur more than twice
>> > >> and play them back even number of times symmetrically? and if there
>> > >> are more letters left, we can put one of them in the center...
>> >
>> > >> linear time.... need additional memory for some kind of hashing
>> >
>> > >> On Jun 21, 11:31 am, Swathi <[email protected]> wrote:
>> >
>> > >> > Does any one know how to return the "Longest palindrome in a string
>> in
>> > >> > O(n)".
>> > >> > From googling i found that we can use suffix trees but there is no
>> code. I
>> > >> > am looking for logic and also for running code.
>> >
>> > >> > Thanks,
>> > >> > Swathi
>> >
>> > > --
>> > > 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 athttp://
>> groups.google.com/group/algogeeks?hl=en.
>> >
>> > --
>> > Sanjay Ahuja,
>> > Analyst, Financing Prime Brokerage
>> > Nomura Securities India Pvt. Ltd
>>
>> --
>> 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?hl=en.
>>
>>
>
>
> --
> Sunny Aggrawal
> B-Tech IV year,CSI
> Indian Institute Of Technology,Roorkee
>
>
>  --
> 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?hl=en.
>



-- 
Warm Regards,
Varun Kumar
Email Id: [email protected]
Contact: +91-9711751235

-- 
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?hl=en.

Reply via email to