1.

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 7This interesting question is from Arrays Types topic in chapter Arrays Types of Data Structures & Algorithms IThis question was posed to me during an internship interview.

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.



Discussion

No Comment Found

Related InterviewSolutions