Overview
Suffix Array Search indexes every suffix of a text in sorted order, then searches patterns by comparing against suffix prefixes.
Finds substrings by binary searching a sorted array of suffixes.
Compact metadata for implementation and discovery.
Suffix Array Search indexes every suffix of a text in sorted order, then searches patterns by comparing against suffix prefixes.
Quick facts
Runtime and memory behavior at a glance.
Best
O(m log n)
Average
O(m log n)
Worst
O(m log n)
Space
O(n)
compare(pattern, text starting at suffix_array[mid])Uses sorted suffix positions to decide which half of the suffix array to keep searching.
Show a pattern narrowing a range in sorted suffixes.
Suffix Array Search operates in O(m log n) time and O(n) space within the Suffix Index Search family. Key governing relation: compare(pattern, text starting at suffix_array[mid]). Often compared with Suffix Array and Suffix Tree.
What each reference supports for this entry.
String algorithms reference for Suffix Array Search string matching, suffix indexing, or edit-distance dynamic programming.
Good next jumps from the relationship graph, ranked for useful discovery.
Pattern Matching · Core
LSH supports approximate search, while suffix arrays support exact substring search.
Compare with thisData Structures · Core
Suffix arrays and suffix trees support substring queries with different space tradeoffs.
Compare with thisSuffix array search binary-searches sorted suffixes.
Suffix arrays and suffix trees support substring queries with different space tradeoffs.