+1 vote
in Data Structures & Algorithms I by (110k points)
LCP array and ______ is used to construct suffix tree.

(a) Hash tree

(b) Hash trie

(c) Suffix array

(d) Balanced tree

Question is from Arrays Types in section Arrays Types of Data Structures & Algorithms I

I have been asked this question during a job interview.

1 Answer

+1 vote
by (408k points)
selected by
Best 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.

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.