The number of rotations required to insert a sequence of elements 9,6,5,8,7,10 into an empty AVL tree is?
A. 0
B. 1
C. 2
D. 3
Solution :-
Answer is D : 3
Rotations are : LL LL RR
Explation :-
Last one should be RR, because node 6 got unbalanced just because of addition of 10 in the right subtree of right child of node 6.
A. 0
B. 1
C. 2
D. 3
Solution :-
Answer is D : 3
Rotations are : LL LL RR
Explation :-
Last one should be RR, because node 6 got unbalanced just because of addition of 10 in the right subtree of right child of node 6.
Thanku very useful information...http://recenttrends.org/
ReplyDeletethanks keep supporting
Deletehttp://recenttrends.org/
ReplyDelete