The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
54 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) https://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 (69.8k points)
edited by | 54 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



Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

28,831 questions
36,676 answers
90,577 comments
34,638 users