Threaded Binary Tree | | Data Structure MCQs

1.

What is a threaded binary tree traversal?

   A.) a binary tree traversal without using stacks and queues
   B.) a binary tree traversal using stacks
   C.) a binary tree traversal using queues
   D.) a binary tree traversal using stacks and queues

Answer: Option 'A'

a binary tree traversal without using stacks and queues

2.

What may be the content of a node in threaded binary tree?

   A.) leftchild_pointer, left_tag, data
   B.) leftchild_pointer, left_tag, data, right_tag, rightchild_pointer
   C.) leftchild_pointer, left_tag
   D.) leftchild_pointer, left_tag, right_tag, rightchild_pointer

Answer: Option 'B'

leftchild_pointer, left_tag, right_tag, rightchild_pointer
It contains additional 2 pointers over normal binary tree node structure.

3.

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?

   A.) preorder
   B.) inorder, postorder, preorder traversals
   C.) inorder
   D.) postorder

Answer: Option 'B'

inorder, postorder, preorder traversals

4.

What are double and single threaded trees?

   A.) when both left, right nodes are having null pointers and only right node is null pointer respectively
   B.) having 2 and 1 node
   C.) using single and double linked lists
   D.) using heaps and priority queues

Answer: Option 'A'

when both left, right nodes are having null pointers and only right node is null pointer respectively

5.

What is wrong with below code for inorder traversal of inorder threaded binary tree:

   inordertraversal(threadedtreenode root):
   threadedtreenode q = inorderpredecessor(root)
   while(q!=root):
   q=inorderpredecessor(q)
   print q.data

   A.) it is code for pre order
   B.) inordersuccessor instead of inorderpredecessor must be done
   C.) code is correct
   D.) it is code for post order

Answer: Option 'B'

inordersuccessor instead of inorderpredecessor must be done

6.

What are the disadvantages of normal binary tree traversals?

   A.) there are many pointers which are null and thus useless
   B.) there is no traversal which is efficient
   C.) improper traversals
   D.) complexity in implementing

Answer: Option 'A'

there are many pointers which are null and thus useless

7.

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

Answer: Option 'A'

inorder predecessor for left node and inorder successor for right node information


Threaded Binary Tree MCQs Download Pdf