1.

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 3My question is from Arrays Types topic in portion Arrays Types of Data Structures & Algorithms IThis question was posed to me in my homework.

Answer» RIGHT option is (a) 2 8 7 4 9 0 5 1 6 3

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.


Discussion

No Comment Found

Related InterviewSolutions