how abt two passes
first one makes a multi map of char and its positions
second one a bit tricky to
eg
abcabcabc
first pass
a,0,3,6,
b,1,4,7
c,2,5,8
second pass
first char is a, its next position is 3(find thrugh the map)
repeated substring can be of length 3
for loop with this (count
jokes apart...then i think it can be done using dynamic programming
using the similar approach of LCS but the time and space complexity
both will be N^2.i am working on the pseudocode and post it within
a few moments if it works..
On 6/29/11, Swathi wrote:
> I dont know why people reply in pl
I never said you don't have right but even after saying they asked me to
write the code.. you are asking the same question which is not at all good..
On Wed, Jun 29, 2011 at 11:01 PM, Ashish Goel wrote:
> chk this and try to write urself
> http://www.allisons.org/ll/AlgDS/Tree/Suffix/
>
> peopl
chk this and try to write urself
http://www.allisons.org/ll/AlgDS/Tree/Suffix/
people hv right to decide if they want to WAP or not.
Best Regards
Ashish Goel
"Think positive and find fuel in failure"
+919985813081
+919966006652
On Wed, Jun 29, 2011 at 10:55 PM, Swathi wrote:
> I dont know why
I dont know why people reply in plain words.. I personally had this
experience and i was asked to code but i couldn't
On Wed, Jun 29, 2011 at 10:53 PM, Piyush Sinha wrote:
> I dnt think any company is gonna ask u to code suffix tree..:P :P
>
> On 6/29/11, Swathi wrote:
> > It does but i am asked
I dnt think any company is gonna ask u to code suffix tree..:P :P
On 6/29/11, Swathi wrote:
> It does but i am asked to code.. if you know the code for suffix tree then
> please provide..
>
> On Wed, Jun 29, 2011 at 10:30 PM, Piyush Sinha
> wrote:
>
>> i think suffix tres will do the job if i hav
It does but i am asked to code.. if you know the code for suffix tree then
please provide..
On Wed, Jun 29, 2011 at 10:30 PM, Piyush Sinha wrote:
> i think suffix tres will do the job if i have not misunderstood the
> question...
>
> On 6/29/11, Swathi wrote:
> > Given a string (assume there no
i think suffix tres will do the job if i have not misunderstood the question...
On 6/29/11, Swathi wrote:
> Given a string (assume there no spaces or punctuations), write a code that
> returns the max. length of the string that has repeated more than once.
>
> Thanks,
> Swathi
>
> --
> You receiv