Advanced
Data Structures & Algorithms
Q87 / 100
What is a suffix array and how is it used?
Correct! Well done.
Incorrect.
The correct answer is B) A sorted array of all suffixes of a string, enabling O(log n) pattern search after O(n log n) or O(n) construction
B
Correct Answer
A sorted array of all suffixes of a string, enabling O(log n) pattern search after O(n log n) or O(n) construction
Explanation
A suffix array combined with an LCP (Longest Common Prefix) array enables efficient string operations: pattern search in O(m log n), LRS in O(n), and is often preferable to suffix trees in practice.
Progress
87/100