+1 vote
in Data Structures & Algorithms I by (110k points)
Which of the following tree traversals work if the null left pointer pointing to the predecessor and null right pointer pointing to the successor in a binary tree?

(a) inorder, postorder, preorder traversals

(b) inorder

(c) postorder

(d) preorder

The doubt is from Threaded Binary Tree in portion Binary Trees of Data Structures & Algorithms I

I got this question during an interview.

1 Answer

+1 vote
by (672k points)
selected by
 
Best answer
Correct choice is (a) inorder, postorder, preorder traversals

To explain: In threaded binary trees, the null left pointer points to the predecessor and the right null pointer point to the successor. In threaded binary trees, we can use in-order, preorder and postorder traversals to visit every node in the tree.

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.

Categories

...