[algogeeks] Re: Google Q: longest word made of subwords within the list

2012-05-23 Thread Abhishek
@prem: can you please explain the approach clearly, I did't get the
approach.

regards
Abhishek

On May 23, 7:43 pm, Doom  wrote:
> I am trying to understand the question.. please let me know the answer for
> the following cases..
>
> case1:
> test
> testlong
> testlongtest
> testlongtestlong
> testtesttest
>
> case2:
> test
> testlong
> testlongtest
>
> case3:
> test
> longest
>
> case4:
> test
> testtes
> ttes
> testtesttes
>
>
>
>
>
>
>
> On Tuesday, 22 May 2012 18:15:16 UTC+5:30, ashgoel wrote:
>
> > write a program to find the longest word made of other words. For
> > instance, If my file has the following words (sorted):
> > test
> > tester
> > testertest
> > testing
> > testingtester
>
> > The longest word should be testingtester. Trie is the solution, what is
> > the best Order possible?
> > Best Regards
> > Ashish Goel
> > "Think positive and find fuel in failure"
> > +919985813081
> > +919966006652

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@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.



[algogeeks] Re: Google Q: longest word made of subwords within the list

2012-05-23 Thread Doom
I am trying to understand the question.. please let me know the answer for 
the following cases..

case1:
test
testlong
testlongtest
testlongtestlong
testtesttest

case2:
test
testlong
testlongtest

case3:
test
longest

case4:
test
testtes
ttes
testtesttes


On Tuesday, 22 May 2012 18:15:16 UTC+5:30, ashgoel wrote:
>
> write a program to find the longest word made of other words. For 
> instance, If my file has the following words (sorted):
> test
> tester
> testertest
> testing
> testingtester
>
> The longest word should be testingtester. Trie is the solution, what is 
> the best Order possible?
> Best Regards
> Ashish Goel
> "Think positive and find fuel in failure"
> +919985813081
> +919966006652
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/algogeeks/-/Psfz5zHpdDoJ.
To post to this group, send email to algogeeks@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.