Why it matters
LCP + SA = versatile string toolkit. Understanding shapes string querying.
Advertisement
The architecture
LCP[i] = |lcp(suffix(SA[i-1]), suffix(SA[i]))|.
Kasai: O(n) from SA + rank array.
Advertisement
How it works end to end
RMQ on LCP: any two suffixes LCP.
Longest repeated substring: max(LCP).
Suffix tree operations.