1.

What is the worst case time complexity of tree sort (when implemented with a balanced tree)?(a) O(n)(b) O(n log n)(c) O(n^2)(d) O(log n)

Answer»

Correct answer is (b) O(n LOG n)

Easiest explanation - The worst case TIME complexity of tree sort DEPENDS on whether the tree used in the implementation is balanced or not. If the tree is balanced then the worst case complexity is O(n log n).



Discussion

No Comment Found

Related InterviewSolutions