Compute-Good-Suffix(P, m) = Prefix(P) P' = reverse(P) ' = Prefix(P') for j = 0 to m ; O(m) [j] = m - [m] for l = 1 to m j = m - '[l] if [j] > l - '[l] then [j] = l - '[l] return
Example