Re: [algogeeks] palindrome substring

2010-06-20 Thread Anand
Here is code to find palindrome in linear time: http://codepad.org/PMJzjpPJ On Fri, Jun 18, 2010 at 5:28 AM, Chunyuan Ge wrote: > good point, i am wrong, sorry > > > > On Fri, Jun 18, 2010 at 5:54 PM, Rohit Saraf > wrote: > >> abcqwertycba >> >> So is abc a palindrome?? >> -

Re: [algogeeks] palindrome substring

2010-06-18 Thread Amir hossein Shahriari
here's a linear time solution: http://www.akalin.cx/2007/11/28/finding-the-longest-palindromic-substring-in-linear-time/ On Fri, Jun 18, 2010 at 4:58 PM, Chunyuan Ge wrote: > good point, i am wrong, sorry > > > > On Fri, Jun 18, 2010 at 5:54 PM, Rohit Saraf > wrote: > >> abcqwertycba >> >> So i

Re: [algogeeks] palindrome substring

2010-06-18 Thread Ratnesh Thakur
check this http://www.akalin.cx/2007/11/28/finding-the-longest-palindromic-substring-in-linear-time/ On Fri, Jun 18, 2010 at 3:36 PM, Manzoor Ahmed wrote: > What do you mean by origin string? > > > On Fri, Jun 18, 2010 at 2:38 PM, Chunyuan Ge wrote: > >> Origin string a, reverse the string to g

Re: [algogeeks] palindrome substring

2010-06-18 Thread Chunyuan Ge
good point, i am wrong, sorry On Fri, Jun 18, 2010 at 5:54 PM, Rohit Saraf wrote: > abcqwertycba > > So is abc a palindrome?? > -- > Rohit Saraf > Second Year Undergraduate, > Dept. of Computer Science and Engineering > IIT Bombay > http://www.cse

Re: [algogeeks] palindrome substring

2010-06-18 Thread Manzoor Ahmed
What do you mean by origin string? On Fri, Jun 18, 2010 at 2:38 PM, Chunyuan Ge wrote: > Origin string a, reverse the string to get b > get the longest common string between a and b > > that's it. > > Chunyuan > > > On Thu, Jun 17, 2010 at 8:38 PM, debajyotisarma > wrote: > >> Find the longest

Re: [algogeeks] palindrome substring

2010-06-18 Thread Rohit Saraf
abcqwertycba So is abc a palindrome?? -- Rohit Saraf Second Year Undergraduate, Dept. of Computer Science and Engineering IIT Bombay http://www.cse.iitb.ac.in/~rohitfeb14 On Fri, Jun 18, 2010 at 3:08 PM, Chunyuan Ge wrote: > Origin string a, reve

Re: [algogeeks] palindrome substring

2010-06-18 Thread Chunyuan Ge
Origin string a, reverse the string to get b get the longest common string between a and b that's it. Chunyuan On Thu, Jun 17, 2010 at 8:38 PM, debajyotisarma wrote: > Find the longest palindrome in the given string. > Minimum time-space complexity required > (i have not solved it so don't kno

Re: [algogeeks] palindrome substring

2010-06-18 Thread Avinash Dubey
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. < sant...@gmail.com> wrote: > I rem

Re: [algogeeks] palindrome substring

2010-06-17 Thread Antony Vincent Pandian.S.
I remember this question under discussion recently. Please check the existing threads... On 6/17/10, debajyotisarma 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 mess

[algogeeks] palindrome substring

2010-06-17 Thread debajyotisarma
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 algoge...@googlegrou