What is inefficient with the below threaded binary tree picture?

Category: QuestionsWhat is inefficient with the below threaded binary tree picture?
Editor">Editor Staff asked 5 months ago

What is inefficient with the below threaded binary tree picture?
 
(a) it has dangling pointers
 
(b) nothing inefficient
 
(c) incorrect threaded tree
 
(d) space is being used more
 
My question comes from Threaded Binary Tree in portion Binary Trees of Data Structures & Algorithms I
 
This question was posed to me in an interview for internship.

1 Answers
Editor">Editor Staff answered 5 months ago

Right answer is (a) it has dangling pointers
 
Easy explanation – The nodes extreme left and right are pointing to nothing which could be also used efficiently.


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