------ art_15402_16974561.1201100709613 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Jan 23, 2008 7:39 PM, Alex Shulgin <alex.shulgin / gmail.com> wrote: > On Jan 22, 10:51 am, Jan <jan.h.... / gmail.com> 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... Yes u'r right ... I should have described more clear: take two adjacent, check whether the "head" of them overlapped: overlap?(s1[0, current_longest_substr.length], s2[0, current_longest_substr.length]) Thanks Jan > > > For aaaa: on the step of comparing aa and aaa, we found they overlapped, > so > > we keep s1 a, but make s2 aaa, the one next to aaa. > > This might be an appropriate hack--I'll try it when I have a > minute. :) > > -- > Cheers, > Alex > > -- Fly on wheels. ------ art_15402_16974561.1201100709613--