What are null nodes filled with in a threaded binary tree?

Category: QuestionsWhat are null nodes filled with in a threaded binary tree?
Editor">Editor Staff asked 1 month ago

What are null nodes filled with in a threaded binary tree?
 
(a) inorder predecessor for left node and inorder successor for right node information
 
(b) right node with inorder predecessor and left node with inorder successor information
 
(c) they remain null
 
(d) some other values randomly
 
My doubt is from Threaded Binary Tree in chapter Binary Trees of Data Structures & Algorithms I
 
I got this question by my college director while I was bunking the class.

1 Answers
Editor">Editor Staff answered 1 month ago

Correct choice is (a) inorder predecessor for left node and inorder successor for right node information
 
The best I can explain: If preorder or postorder is used then the respective predecessor and successor info is stored.