Figure below is a balanced binary tree. If a node inserted as child of the node R, how many nodes will become unbalanced?

Category: QuestionsFigure below is a balanced binary tree. If a node inserted as child of the node R, how many nodes will become unbalanced?
Editor">Editor Staff asked 5 months ago

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 Answers
Editor">Editor Staff answered 5 months ago

Right option is (b) 1
 
To explain: Only the node P will become unbalanced, with balance factor +2.


Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17
Articles: 40702