1.

What is the time complexity for searching k+1 auxiliary trees?(a) k+2 O (log (log n))(b) k+1 O (log n)(c) K+2 O (log n)(d) k+1 O (log (log n))I'd like to ask this question from Binary Trees topic in division Binary Trees of Data Structures & Algorithms II had been asked this question in an interview for internship.

Answer»

The correct option is (d) k+1 O (log (log n))

The BEST I can explain: Since each search operation in the AUXILIARY tree takes O (log (log n)) time as auxiliary tree SIZE is bounded by the height of the REFERENCE tree that is log n. So for k+1 auxiliary trees, TOTAL search time is k+1 O (log (log n)).



Discussion

No Comment Found

Related InterviewSolutions