What will be the balancing factor of node 14 in an AVL tree when a node 13 is…
2021
What will be the balancing factor of node 14 in an AVL tree when a node 13 is deleted from it?


- A.
BF(14) = −1
- B.
BF(14) = −2
- C.
BF(14) = 2
- D.
BF(14) = 1
Attempted by 431 students.
Show answer & explanation
Correct answer: B
Step 1: Identify the heights of the left and right subtrees of node 14 before deletion. The left subtree of 14 height is 2 before deletion. The right subtree of 14 height is 3.
Step 2: When node 13 is deleted, the left subtree of node 14 height is 1.
Step 3: The balance factor (BF) of a node is calculated as (height of left subtree - height of right subtree).
Step 4: After deletion, BF(14) = 1 - 3 = -2.