+1 vote
in Data Structures & Algorithms I by (110k points)
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 Answer

+1 vote
by (672k points)
selected by
Best answer
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.

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.