1.

Suffix array can be created by performing __________ traversal of a suffix tree.(a) breadth-first(b) level order(c) depth-first(d) either breadth-first or level orderI want to ask this question from Arrays Types topic in section Arrays Types of Data Structures & Algorithms IThis question was addressed to me in exam.

Answer»

Right answer is (c) depth-first

Best explanation: A suffix tree is a trie, which CONTAINS all the suffixes of the GIVEN STRING as their keys and POSITIONS in the string as their values. So, we can construct a suffix array by performing the depth-first traversal of a suffix tree.



Discussion

No Comment Found

Related InterviewSolutions