From: Alex Shulgin Date: 2008-01-23T20:39:57+09:00 Subject: Re: Longest Repeated Substring (#153) On Jan 22, 10:51 am, Jan wrote: > [Note: parts of this message were removed to make it a legal post.] > > Hi Alex, > > Have the same problem with you :) > > I think we should understand the 'adjacent' as 'not overlapped adjacent' > here. Each time we take two adjacent suffix, we check whether they > overlapped first - if so, make s2 point to next suffix, until we found a not > overlapped one. Hm... but every pair of suffixes _are_ overlapped just 'cause all of them last to the end of the text, so we cannot 'check first'. Anyway... > For aaaa: on the step of comparing aa and aaa, we found they overlapped, so > we keep s1 = aa, but make s2 = aaaa, the one next to aaa. This might be an appropriate hack--I'll try it when I have a minute. :) -- Cheers, Alex