Question 69Asked in DSSSB TGT Computer Science (Technical), 7 Aug 2021, Shift 2

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.
  1. ABF(14) = −1
  2. BBF(14) = −2
  3. CBF(14) = 2
  4. DBF(14) = 1
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.

From DSSSB TGT Computer Science PYQ (Technical), 7 Aug 2021, Shift 2

This is question 69 of DSSSB TGT Computer Science PYQ (Technical), 7 Aug 2021, Shift 2. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.