check two types of palindromes.. even and odd and as soon as u get one. just expand on both sides to get the longest one..
even palindromes are arr[i]==arr[i+1] and odd palindromes are arr[i]==arr[i=2] On Fri, Jun 18, 2010 at 9:20 AM, Antony Vincent Pandian.S. < [email protected]> wrote: > I remember this question under discussion recently. Please check the > existing threads... > > On 6/17/10, debajyotisarma <[email protected]> wrote: > > Find the longest palindrome in the given string. > > Minimum time-space complexity required > > (i have not solved it so don't know what is min) > > > > -- > > 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]<algogeeks%[email protected]> > . > > For more options, visit this group at > > http://groups.google.com/group/algogeeks?hl=en. > > > > > > -- > Sent from my mobile device > > Luv, > S.Antony Vincent Pandian > > -- > 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]<algogeeks%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- Avinash Dubey +91-7799562235 -- 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.
