Re: [algogeeks] Print longest string duplicated M times

2012-05-21 Thread Jeevitesh
You can use Suffix Arrays or Suffix Trees. On Mon, May 21, 2012 at 8:17 AM, Ashish Goel wrote: > soln pls > > > Best Regards > Ashish Goel > "Think positive and find fuel in failure" > +919985813081 > +919966006652 > > > On Sun, May 20, 2012 at 5:49 PM, jalaj jaiswal > wrote: > >> I can give yo

Re: [algogeeks] Print longest string duplicated M times

2012-05-20 Thread Ashish Goel
soln pls Best Regards Ashish Goel "Think positive and find fuel in failure" +919985813081 +919966006652 On Sun, May 20, 2012 at 5:49 PM, jalaj jaiswal wrote: > I can give you a dynamic programming approach in O(n^2) and O(n) space . > > On Tue, May 15, 2012 at 12:22 PM, Ashish Goel wrote: > >>

[algogeeks] Print longest string duplicated M times

2012-05-14 Thread Ashish Goel
I am unclear about the answer provided by Programming Pearls on the question. What this does is to find longest string whose beginning is separated by exactly M chars. The original question is to find the longest string duplicated M times. Any ideas on the approach for this? I could think of havin