Re: [algogeeks] Longest palindrome in a given str (less than O(n^2) )

2010-07-07 Thread Amit Jaspal
I don't understand how to constuct the suffix tree in less than O(n^2) can anyone explain me this? On Tue, Jul 6, 2010 at 10:03 AM, Jitendra Kushwaha jitendra.th...@gmail.com wrote: @Ankit Narang Think about your algo it is not a O(n). First of all you wont get solution comparing start of

Re: [algogeeks] Longest palindrome in a given str (less than O(n^2) )

2010-07-06 Thread Jitendra Kushwaha
@Ankit Narang Think about your algo it is not a O(n). First of all you wont get solution comparing start of str1 and end of str2 Their is solution in O(n) other than suffix tree Here is the link http://www.akalin.cx/2007/11/28/finding-the-longest-palindromic-substring-in-linear-time/ --

[algogeeks] Longest palindrome in a given str (less than O(n^2) )

2010-07-05 Thread vijay
Longest palindrome in a given str (less than O(n^2) ) i think we should use suffix tree. does anyone know the algo\logic? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algoge...@googlegroups.com. To

Re: [algogeeks] Longest palindrome in a given str (less than O(n^2) )

2010-07-05 Thread jalaj jaiswal
make a generalised suffix tree of str and reverse of str then for every two nodes find the longest common prefix On Mon, Jul 5, 2010 at 10:45 PM, vijay auvija...@gmail.com wrote: Longest palindrome in a given str (less than O(n^2) ) i think we should use suffix tree. does anyone know the

Re: [algogeeks] Longest palindrome in a given str (less than O(n^2) )

2010-07-05 Thread Ashish Goel
refer http://www.allisons.org/ll/AlgDS/Tree/Suffix/ this would be at most O(n) Best Regards Ashish Goel Think positive and find fuel in failure +919985813081 +919966006652 On Mon, Jul 5, 2010 at 10:45 PM, vijay auvija...@gmail.com wrote: Longest palindrome in a given str (less than O(n^2)