๐งฌ Suffix Array: Indexing Every Ending of a String
The simulator builds the suffix array and LCP array for a string you provide, then visually sorts every suffix, lets you run a binary search for a chosen pattern, and highlights the matching block of suffixes along with the longest repeated substring.
๐ฌ What It Demonstrates
The simulator builds the suffix array and LCP array for a string you provide, then visually sorts every suffix, lets you run a binary search for a chosen pattern, and highlights the matching block of suffixes along with the longest repeated substring.
๐ฎ How to Use
Type or choose a sample string, watch all its suffixes get listed and sorted into the suffix array, then enter a search pattern to see the binary search narrow down to the matching range step by step, and toggle the LCP array view to see shared prefix lengths between neighboring suffixes.
๐ก Did You Know?
Suffix array construction algorithms fast enough to index entire human chromosomes, each with hundreds of millions of bases, were a major breakthrough for genome sequencing software, since the naive sorting approach would have been completely impractical at that scale.