1.

What is the worst case time complexity of insertion operation(n =no. of candidates)?(a) O(1)(b) O(n)(c) O(log n)(d) O(n log n)My doubt is from Trees in section Trees of Data Structures & Algorithms II have been asked this question in exam.

Answer»

Right CHOICE is (a) O(1)

The EXPLANATION is: The WORST case in a bin INSERT operation occurs when all the candidates are concentrated in one bin. So in this case the time complexity is O(1).



Discussion

No Comment Found

Related InterviewSolutions