Recall & Review
beginner
What is a suffix array?
A suffix array is a sorted array of all suffixes of a string. It stores the starting positions of these suffixes in sorted order.
Click to reveal answer
beginner
Why are suffix arrays useful?
Suffix arrays help quickly find patterns or substrings in a text. They are used in text search, data compression, and bioinformatics.
Click to reveal answer
intermediate
How does a suffix array differ from a suffix tree?
A suffix array is a simple list of suffix positions sorted lexicographically, while a suffix tree is a tree structure representing all suffixes. Suffix arrays use less memory but may be slower for some queries.
Click to reveal answer
intermediate
What is the time complexity to build a suffix array using efficient algorithms?
Efficient algorithms can build a suffix array in O(n) or O(n log n) time, where n is the length of the string.
Click to reveal answer
intermediate
How can suffix arrays help in finding the longest repeated substring?
By examining the longest common prefix (LCP) between adjacent suffixes in the suffix array, we can find the longest repeated substring in the text.
Click to reveal answer
What does each element in a suffix array represent?
✗ Incorrect
Each element in a suffix array is the starting index of a suffix in the original string.
What is the main advantage of suffix arrays over suffix trees?
✗ Incorrect
Suffix arrays use less memory compared to suffix trees, making them more space-efficient.
Which of the following is a common use of suffix arrays?
✗ Incorrect
Suffix arrays are commonly used to find substrings quickly in a text.
What does LCP stand for in the context of suffix arrays?
✗ Incorrect
LCP stands for Longest Common Prefix, which helps find repeated substrings.
If a string has length n, what is the maximum number of suffixes it has?
✗ Incorrect
A string of length n has exactly n suffixes, one starting at each position.
Explain what a suffix array is and how it is constructed from a string.
Think about listing all endings of a word and sorting them alphabetically.
You got /4 concepts.
Describe one practical application of suffix arrays and how they help solve the problem.
Consider how you might quickly find if a word appears inside a large text.
You got /4 concepts.