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 5 months 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 5 months 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.


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: 40701