retagged by
784 views
1 votes
1 votes
Which sequence If inserted in AVL tree will cause No adjustment in tree?                                

a) 1 2 3 4 5                                                                                                                                                      
b) 5 4 3 2 1                                                                                                                                                                        
c) 3 2 4 1 5                                                                                                                                                                  
d) 4 3 1 2 5
retagged by

3 Answers

1 votes
1 votes
in option a,b,d  when we insert first 3 element it require rotation but in option c no need of any rotation simply just insert.
option c is correct.
0 votes
0 votes
The answer will be (C)
while constructing the tree using the given elements, at every step, balance factor of each node takes values 0,+1 or -1, hence no rotation(s) required.
0 votes
0 votes
c) 3 2 4 1 5

If we insert the above sequence in AVL tree, no adjustment is needed.because none of the node get unbalance during insertion.

Related questions

3 votes
3 votes
1 answer
1
hrcule asked Jul 16, 2018
2,770 views
Let T be a binary search tree with n nodes and Sn be the average number of comparisons required for successful search and Un be the average number of comparison required ...
4 votes
4 votes
0 answers
2
AnilGoudar asked Jan 10, 2018
3,340 views
When node 50 will be deleted, what will be resultant AVL tree?
4 votes
4 votes
1 answer
3
Manu Thakur asked Jul 27, 2017
6,982 views
What is the max possible height of an AVL tree with 20 nodes?a. 4b.5c.6d.7 In my opinion answer should be b.5 because height of a tree with 1 node is 0 not 1, and recurre...
0 votes
0 votes
2 answers
4
PEKKA asked Nov 16, 2016
680 views
Is this an example of AVL Tree ? Here Number of Left Child of Root =4 Number of Right Child of Root =2 Hence Balacing Factor is 2 Hence Not AVL Tree. If so please show ...