Re: [algogeeks] Re: Longest Palindromic Substring

2010-08-28 Thread jaladhi dave
this has been discussed here before and if i remeber correctly the solution was O(nlogn). Please go through the archives. On Thu, Aug 26, 2010 at 12:20 PM, Aditya Shanker adit.sh...@gmail.comwrote: The question would be complete if we know what order of notation is needed for solution. On

Re: [algogeeks] Re: Longest Palindromic Substring

2010-08-26 Thread Aditya Shanker
The question would be complete if we know what order of notation is needed for solution. On 23.08.2010 15:32, Chi Hoang wrote: I don't think so, I've have wriiten a kart-trie: http://sourceforge.net/projects/kart-trie which is basically a patricia-tree or radix-tree. Such a tree has maximum

Re: [algogeeks] Re: Longest Palindromic Substring

2010-08-23 Thread Chi Hoang
I don't think so, I've have wriiten a kart-trie: http://sourceforge.net/projects/kart-trie which is basically a patricia-tree or radix-tree. Such a tree has maximum 2 leafs at each branch whilst a suffix-tree can has more then 2 leafs at each branch (BTW. can you explain to me what does edge means

[algogeeks] Re: Longest Palindromic Substring

2010-08-22 Thread Giri
urs s correct 1ly for few cases.. but in the following case it doesnt give the longest seq: abadabac here 'aba' will be printed and not 'abadaba', which s d correct ans On Aug 22, 5:18 am, venkatesan B venkat_b_engin...@yahoo.co.in wrote: use stackpush one by one element before compare to top 2

Re: [algogeeks] Re: Longest Palindromic Substring

2010-08-22 Thread venkatesan B
=Tempfinish --- On Sun, 22/8/10, Giri giri.pe...@gmail.com wrote: From: Giri giri.pe...@gmail.com Subject: [algogeeks] Re: Longest Palindromic Substring To: Algorithm Geeks algogeeks@googlegroups.com Date: Sunday, 22 August, 2010, 9:29 PM urs s correct 1ly for few cases.. but in the following case

[algogeeks] Re: Longest Palindromic Substring

2010-08-21 Thread Chi
Isn't that by definition a compressed trie, i.e patricia-tree, crit- bit tree (suffix-tree)? Or what is the difference? On Aug 20, 5:17 pm, Nikhil Jindal fundoon...@yahoo.co.in wrote: @chonku As i understand, a trie is used when we have a lot of strings (such as a dictionary). Here we just

Re: [algogeeks] Re: Longest Palindromic Substring

2010-08-21 Thread Chonku
You use a trie when you want to model a number of strings. Suffix Tree is used only when you have one string in your model. Suffix Tree is a type of trie, but the difference lies in the intent. On Sat, Aug 21, 2010 at 7:22 PM, Chi c...@linuxdna.com wrote: Isn't that by definition a compressed

[algogeeks] Re: Longest Palindromic Substring

2010-08-19 Thread Saikat Debnath
Isn't the longest palindromic substring is alevela??? On Aug 19, 7:16 pm, Nikhil Jindal fundoon...@yahoo.co.in wrote: Hi All, Givan a string, you have to find the longest palindromic substring. For ex: Longest Palindromic substring for abclevelabc is level. What is the most optimised

Re: [algogeeks] Re: Longest Palindromic Substring

2010-08-19 Thread Divya Chandrasekar
A substring is continuous, whereas a subsequence is discontinuous. alevela is a palindromic subsequence, and not a substring. On Thu, Aug 19, 2010 at 11:45 AM, Saikat Debnath saikat@gmail.comwrote: Isn't the longest palindromic substring is alevela??? On Aug 19, 7:16 pm, Nikhil Jindal