Design
aa0401.txt
Associated article: Algorithm Alley
Tags: Design
Published source code accompanying the article by Jon Bentley in which he examines suffix trees, which are simple, yet powerful, data structures: Fill an array with pointers to every position in a string, sort the array, then quickly search the string for long phrases.
Algorithm Alley
by Jon Bentley
Example 1:
(a)
maxlen = -1
for (i = 0; i < n; i++)
for (j = 0; j < n; j++)
thislen = comlen(&c[i], &c[j])
if thislen > maxlen
maxlen = thislen
maxi = i
maxj = j
(b)
...


