Follow alignments, prefix functions, rolling hashes, suffix structures, tries, and automata transitions.