Which node is the parent node of Node 6?

Category: QuestionsWhich node is the parent node of Node 6?
Editor">Editor Staff asked 5 months ago

Which node is the parent node of Node 6?
 
(a) 1
 
(b) 5
 
(c) 2
 
(d) 3
 
My question comes from 1 in section Trees of Data Structures & Algorithms I
 
This question was addressed to me during an interview.

1 Answers
Editor">Editor Staff answered 5 months ago

The correct option is (c) 2
 
Easiest explanation – Since Node 2 has two children Node 5 and Node 6, So Node 2 is the parent node of Node 6. While Node 1 is root node and Node 3 and Node 5 are Leaf node.


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