+1 vote
in Data Structures & Algorithms I by (88.2k points)
What is a time complexity for x pattern occurrence of length n?

(a) O (log n!)

(b) Ɵ (n!)

(c) O (n^2)

(d) Ɵ (n + x)

I want to ask this question from Suffix tree topic in portion Trie of Data Structures & Algorithms I

I have been asked this question in an online quiz.

1 Answer

+1 vote
by (672k points)
selected by
 
Best answer
The correct option is (d) Ɵ (n + x)

The explanation is: Suffix tree is also known as PAT tree or position tree. It allows fast string operation. To check if a substring is present in a string of a length of n, the time complexity for such operation is found to be O (n). The time complexity for x pattern occurrence of length n is Ɵ (n + x).

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.

Categories

...