in DS retagged by
837 views
1 vote
1 vote

How to solve question of the following type without creating a tree for each given option.

 

Which of the following order of elements are inserted into an empty AVL tree so that it is possible to get the above AVL tree.

A. 94,71,86,25,98,83,27,90

B 98,94,90,83,86,25,71,27

C. 86,25,98,83,27,90,71,94

D. None of these

in DS retagged by
by
837 views

4 Comments

get the above AVL tree

Where is the tree?

0
0
I have edited it. Thanks for notice :-)
0
0

I don't think that there is any other easy method to check the options without creating tree..

2
2
IT IS C ............................
1
1

2 Answers

1 vote
1 vote
'C' is correct.
0 votes
0 votes
C is correct option which includes RL and LR rotations sequentially