1.

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 IThe question was posed to me at a job interview.

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).



Discussion

No Comment Found

Related InterviewSolutions