10 votes 10 votes The number of rotations required to insert a sequence of elements $9, 6, 5, 8, 7, 10$ into an empty $AVL$ tree is? $0$ $1$ $2$ $3$ DS isro2013 data-structures avl-tree + – makhdoom ghaya asked Apr 25, 2016 • edited Dec 18, 2023 by Hira Thakur makhdoom ghaya 8.4k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 20 votes 20 votes Answer is D] 3 Rotations are : LL LL RR Desert_Warrior answered Jun 5, 2016 • selected Jun 26, 2016 by shivanisrivarshini Desert_Warrior comment Share Follow See all 2 Comments See all 2 2 Comments reply vijaycs commented Jun 5, 2016 reply Follow Share 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. 0 votes 0 votes Desert_Warrior commented Jun 5, 2016 reply Follow Share Answer edited. Thanks 0 votes 0 votes Please log in or register to add a comment.
3 votes 3 votes Number of rotation = 3 Following are the roatation 1. LL 2 LL 3.RR Dexter answered Apr 25, 2016 Dexter comment Share Follow See all 0 reply Please log in or register to add a comment.