The figure shown below is a balanced binary tree. If node P is deleted, which of the following nodes will get unbalanced?

Category: QuestionsThe figure shown below is a balanced binary tree. If node P is deleted, which of the following nodes will get unbalanced?
Editor">Editor Staff asked 4 weeks ago

The figure shown below is a balanced binary tree. If node P is deleted, which of the following nodes will get unbalanced?
 
(a) U
 
(b) M
 
(c) H
 
(d) A
 
My doubt is from Binary Trees in section Binary Trees of Data Structures & Algorithms I
 
I have been asked this question in a job interview.

1 Answers
Editor">Editor Staff answered 4 weeks ago

The correct choice is (a) U
 
The best explanation: Node U will get unbalanced if node P is deleted, because it’s balance factor will become -2.