Last Updated :
18 Dec, 2018
Construct the AVL tree for given input: 14, 17, 11, 7, 53, 4, 13, 12, 5, 9. What is total number of rotations required for contracting this AVL tree? (Assume that LR rotation as 1 rotation and RL as 1 rotation).
(A) 3
(B) 4
(C) 5
(D) 7
Answer: (B)
Explanation: Total rotation are as follows on insertion of 14, 17, 11, 7, 53, 4, 13, 12, 5 and 9:
So, option (B) is correct.
Quiz of this Question
Share your thoughts in the comments
Please Login to comment...