+1 vote
in Data Structures & Algorithms I by (88.2k points)
What is a time complexity for finding all the tandem repeats?

(a) Ɵ (n)

(b) Ɵ (n!)

(c) Ɵ (1)

(d) O (n log n + z)

Query is from Suffix tree topic in chapter Trie of Data Structures & Algorithms I

The question was posed to me at a job interview.

1 Answer

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

Best explanation: Tandem Repeats are formed in DNA when the nucleotides pattern repeats more than once. 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 finding all the tandem repeats in a string is O (n log n + z).

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.