37 views

1)Consider the AVL tree with n nodes. The best upper bound on the time required to insert n more elements in given AVL tree is O(na logb n). Then the value of a + 50b is ________.

----------------------------------------------------------------------------------------------------------------------------------------------------

What the difference these two questions in calculation?

Ans of both question should be different?

Binary tree can be both AVL tree or BST.

best upper bound= lowest upper bound should be worst case.

Then GATE question complexity should be $\Theta (n log n)$

Plz explain

edited | 37 views

In both questions there's no relation, given question is for AVL and gate question is for binary tree not AVL.

Scondly in gate question we need to find subtree i.e just traversal and in current we have to insert n elements in AVL --> which is nothing but nlogn.

So here a and b is 1. => a+50b --> 51.