[Solved] What will be the suffix array of the string “engineering”?

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

Answer: d
Explanation: 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.

Comments