+1 vote
in Data Structures & Algorithms I by (88.2k points)
How much space does construction of suffix tree takes?

(a) O (log M)

(b) Exponential to Length of Tree

(c) O (M!)

(d) Linear to Length of Tree

Origin of the question is Suffix Tree topic in section Trie of Data Structures & Algorithms I

This question was addressed to me at a job interview.

1 Answer

+1 vote
by (672k points)
selected by
Best answer
Correct option is (d) Linear to Length of Tree

The explanation is: Suffix tree is also known as PAT tree or position tree. It is a compressed search tree or prefix tree in which keys contain the suffix of text values as the text position. It allows fast string operation. Total space taken for construction of a suffix tree is linear to the length of the tree.

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.