Data Structure Questions and Answers-Threaded Binary Tree
What is a threaded binary tree traversal?
a binary tree traversal using stacks
a binary tree traversal using queues
a binary tree traversal using stacks and queues
a binary tree traversal without using stacks and queues
Question 1 Explanation:
This type of tree traversal will not use stack or queue.
What are the disadvantages of normal binary tree traversals?
there are many pointers which are null and thus useless
there is no traversal which is efficient
complexity in implementing
Question 2 Explanation:
As there are majority of pointers with null value going wasted we use threaded binary trees.
What may be the content of a node in threaded binary tree?
leftchild....pointer, left....tag, data, right....tag, rightchild....pointer
leftchild....pointer, left....tag, right....tag, rightchild....pointer
leftchild....pointer, left....tag, data
Question 3 Explanation:
It contains additional 2 pointers over normal binary tree node structure.
What are null nodes filled with in a threaded binary tree?
inorder predecessor for left node and inorder successor for right node information
right node with inorder predecessor and left node with inorder successor information
they remain null
some other values randomly
Question 4 Explanation:
If preorder or postorder is used then the respective predecessor and successor info is stored.
The null left pointer pointing to predecessor and null right pointer pointing to successor. how many types of threaded tree are possible with this convention?
inorder, postorder, preorder traversals
Question 5 Explanation:
Those are the three representations of binary threaded trees.
There are 5 questions to complete.