Suffix Array & Kasai's LCP Algorithm Interactive Visualizer
A Suffix Array stores the sorted starting indices of all suffixes of a string, built in O(n log n) time via prefix doubling and paired with Kasai's O(n) LCP array for fast substring search and counting.
Study Suffix Array & Kasai's LCP Algorithm Explanation · View Multi-Language Code · All Algorithms