@chonku
As i understand, a trie is used when we have a lot of strings (such as a
dictionary).
Here we just have a single string. The resultant trie will be:

a
 \
  b
   \
    c
     \
      l
       \
        e
         \
          v
           \
            e
             \
              l
               \
                a
                 \
                  b
                   \
                    c

We get a similar trie for the reverse string.

So why are you using a trie here? I cant see any advantage of it here.

On Fri, Aug 20, 2010 at 8:36 AM, Chonku <cho...@gmail.com> wrote:

> Can we use a trie here.
> Make first pass from left to right and construct the trie.
> Make second pass from right to left and look for the trie branch with
> maximum nodes that match the characters.
>
> On Thu, Aug 19, 2010 at 7:46 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 solution possible?
>>
>> Please access the attached hyperlink for an important electronic 
>> communications disclaimer: 
>> http://dce.edu/web/Sections/Standalone/Email_Disclaimer.php
>>
>>
>>
>> --
>>
>> 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 unsubscribe from this group, send email to 
>> algogeeks+unsubscr...@googlegroups.com 
>> <algogeeks%2bunsubscr...@googlegroups.com>.
>>
>>
>> For more options, visit this group at 
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>>
>>
>  --
> 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 unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

Please access the attached hyperlink for an important electronic communications 
disclaimer: http://dce.edu/web/Sections/Standalone/Email_Disclaimer.php

-- 
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 unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to