Home▸Algorithms & AI▸Suffix Array: Fast Substring Search Made Simple

🧬 Suffix Array: Indexing Every Ending of a String

Suffix array in 3D: sorted suffix cards, LCP bars and a glass window that shrinks as two binary searches find every occurrence of a pattern; same model core as the 2D twin, five independent numerical checks.

Algorithms & AI3DModerate60 FPS📱 Mobile-adapted🟠 Blender⇄ 2D version
Suffix Array: Fast Substring Search Made Simple ↗ Open standalone

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.

⚙ Under the hood

Suffix array in 3D: sorted suffix cards, LCP bars and a glass window that shrinks as two binary searches find every occurrence of a pattern; same model core as the 2D twin, five independent numerical checks.

suffix-arraystring-algorithmsbinary-searchlcp-arraybioinformaticstext-indexingcomputer-sciencedata-structures

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)