Suffix array of the string “statistics” is ____________

Suffix array of the string “statistics” is ____________
A. 2 8 7 4 9 0 5 1 6 3
B. 2 7 4 9 8 0 5 1 6 3
C. 2 4 9 0 5 7 8 1 6 3
D. 2 8 7 0 5 1 6 9 4 3
 
Answer: a
Explanation: The suffix array of the string statistics will be:
2 atistics
8 cs
7 ics
4 istics
9 s
0 statistics
5 stics
1 tatistics
6 tics
3 tistics
In Suffix array, we only store the indices of suffixes. So, correct option is 2 8 7 4 9 0 5 1 6 3.
 

Tìm kiếm

Back
Top