Suffix Arrays

Back to Suffix Structures

A sorted array of all suffixes of a string, represented by their starting indices. Enables efficient substring search in O(m log n) time. More space-efficient than suffix trees. Can be constructed in O(n) time with advanced algorithms (SA-IS).

algorithms string-algorithms suffix-arrays