1.

LCP array and ______ is used to construct suffix tree.(a) Hash tree(b) Hash trie(c) Suffix array(d) Balanced treeQuestion is from Arrays Types in section Arrays Types of Data Structures & Algorithms II have been asked this question during a job interview.

Answer»

Correct option is (c) SUFFIX ARRAY

Explanation: Suffix tree can be CREATED using an LCP array and a suffix array. If we are GIVEN a string of length (n + 1) and its suffix array and LCP array, we can construct the suffix tree in linear time i.e in O(n) time.



Discussion

No Comment Found

Related InterviewSolutions