Which tree provides a linear time solution for substring operation?
(a) Rope Tree
(b) Suffix Tree
(c) Tango Tree
(d) Top Tree
My question is based upon Suffix Tree topic in division Trie of Data Structures & Algorithms I
I had been asked this question by my college professor while I was bunking the class.
Correct answer is (b) Suffix Tree
Easiest explanation – 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 to be carried out by the user. The substring operation can be performed by suffix tree in linear time.