A suffix array is a sorted array of all the starting positions of every suffix of a string, and a suffix array construction algorithm builds this array efficiently rather than by the naive approach of generating and sorting every suffix directly, which is slow for long strings. Efficient construction methods use techniques such as prefix doubling, sorting suffixes by successively longer prefixes whose lengths double at each round, achieving O(n log n) time, while later linear-time methods such as the DC3 or skew algorithm achieve O(n) construction. Once built, a suffix array supports fast substring search and underlies many string processing structures, including full-text indexes and the Burrows-Wheeler transform.
Facts
Time ComplexityO(n), linear time, by building a suffix tree in O(n) and converting it to a suffix array by depth-first traversal in O(n) 1 Credited ToManber and Myers, 1990 (introduction of suffix arrays) 1 Sources
1. Wikipedia: Suffix Array
Wikimedia FoundationConstruction algorithms section
so there exist algorithms that can build a suffix array in O ( n )
Introduction
Suffix arrays were introduced by Manber & Myers (1990) as a simple, space efficient alternative to suffix trees.
View the Source Reader Challenges (0)
No disputes yet. Spotted an error or a better source? Open the first one.
Sign in to dispute this or suggest a correction.