Suffix Trees and Suffix Arrays
A suffix tree is a compressed trie containing all suffixes of a string, while a suffix array stores the starting positions of all suffixes in lexicographically sorted order. They support advanced string-processing tasks such as substring search, longest repeated substring, longest common substring, and pattern matching.
Suffix Tree supports many substring operations efficiently.
Suffix Array uses substantially less memory than a naive suffix tree.
LCP arrays complement suffix arrays for repeated-substring problems.
Applications include indexing, text search, and bioinformatics.