+1 vote
in Data Structures & Algorithms I by (110k points)
What will be the suffix array of the string “engineering”?

(a) 2 3 8 4 9 1 7 5 0 6 10

(b) 5 0 6 1 4 9 1 7 0 2 3 8

(c) 5 0 6 10 2 4 9 1 7 3 8

(d) 5 0 6 10 2 3 8 4 9 1 7

This interesting question is from Arrays Types topic in chapter Arrays Types of Data Structures & Algorithms I

This question was posed to me during an internship interview.

1 Answer

+1 vote
by (408k points)
selected by
 
Best answer
The correct choice is (d) 5 0 6 10 2 3 8 4 9 1 7

To explain: Correct choice is : 5 0 6 10 2 3 8 4 9 1 7.

Because the suffix array formed will be: 5 eering 0 engineering 6 ering 10 g 2 gineering 3 ineering 8 ing 4 neering 9 ng 1 ngineering 7 ring.

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.

Categories

...