What will be the balancing factor of node 14 in an AVL tree when a node 13 is deleted from it?
What will be the balancing factor of node 14 in an AVL tree when a node 13 is deleted from it?
Tree: root 14 has left child 1 and right child 64. Node 1 has right child 13. Node 64 has left child 26 and right child 98. Node 98 has left child 85 and right child 110.
Show answerHide answer
Correct answer: (B) BF(14) = −2
Explanation
After deleting 13, the left subtree of 14 is just node 1 (height 1). The right subtree 64 → 98 → 85 has height 3. BF = 1 − 3 = −2.