GATE CSE
First time here? Checkout the FAQ!
x
0 votes
45 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 ________.

2) http://gateoverflow.in/1776/gate2014-1_12

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

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

asked in DS by Veteran (55.7k points)  
edited by | 45 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.

Please log in or register to answer this question.

Related questions



Top Users Jul 2017
  1. Bikram

    5784 Points

  2. manu00x

    3602 Points

  3. Arjun

    1988 Points

  4. Debashish Deka

    1924 Points

  5. joshi_nitish

    1908 Points

  6. pawan kumarln

    1680 Points

  7. Tesla!

    1426 Points

  8. Hemant Parihar

    1334 Points

  9. Shubhanshu

    1180 Points

  10. Arnab Bhadra

    1124 Points


24,169 questions
31,187 answers
71,039 comments
29,512 users