GATE CSE
First time here? Checkout the FAQ!
x
0 votes
48 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 (58.4k points)  
edited by | 48 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 Sep 2017
  1. Habibkhan

    6970 Points

  2. Warrior

    2490 Points

  3. Arjun

    2368 Points

  4. rishu_darkshadow

    2136 Points

  5. A_i_$_h

    2004 Points

  6. nikunj

    1980 Points

  7. makhdoom ghaya

    1760 Points

  8. manu00x

    1750 Points

  9. Bikram

    1744 Points

  10. SiddharthMahapatra

    1718 Points


26,060 questions
33,668 answers
79,747 comments
31,079 users