+1 vote
in Data Structures & Algorithms I by (110k points)
Figure below is a balanced binary tree. If a node inserted as child of the node R, how many nodes will become unbalanced?

(a) 2

(b) 1

(c) 3

(d) 0

The origin of the question is Binary Trees topic in chapter Binary Trees of Data Structures & Algorithms I

This question was addressed to me by my college director while I was bunking the class.

1 Answer

+1 vote
by (672k points)
selected by
 
Best answer
Right option is (b) 1

To explain: Only the node P will become unbalanced, with balance factor +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.

Categories

...