What is the worst case time complexity of the binary tree sort?

What is the worst case time complexity of the binary tree sort? Correct Answer O(n2)

For the binary tree sort the worst case when the BST constructed is unbalanced. BST gets unbalanced when the elements are already sorted. So, in the worst case, O(n2) time is required to built the BST and O(n) time to traverse the tree. Therefore, the worst case time complexity is O(n2) + O(n) = O(n2).
Bissoy MCQ

Related Questions