YOU CAN DOWNLOAD 200+ SUBJECTS PDF BOOK FOR COMPETITIVE EXAMINATIONS
Postorder Traversal Multiple choice Questions and Answers (MCQs)
Question 6 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER] |
A full binary tree can be generated using .....
post-order and pre-order traversal | |
pre-order traversal | |
post-order traversal | |
in-order traversal |
Question 6 Explanation:
Every node in a full binary tree has either 0 or 2 children. A binary tree can be generated by two traversals if one of them is in-order. But, we can generate a full binary tree using post-order and pre-order traversals.
Question 7 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER] |
The maximum number of nodes in a tree for which post-order and pre-order traversals may be equal is .....
3 | |
1 | |
2 | |
any number |
Question 7 Explanation:
The tree with only one node has post-order and pre-order traversals equal.
Question 8 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER] |
The steps for finding post-order traversal are traverse the right subtree, traverse the left subtree or visit the current node.
True | |
False |
Question 8 Explanation:
Left subtree is traversed first in post-order traversal, then the right subtree is traversed and then the output current node.
Question 9 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER] |
The pre-order and in-order are traversals of a binary tree are T M L N P O Q and L M N T O P Q. Which of following is post-order traversal of the tree?
L N M O Q P T | |
N M O P O L T | |
L M N O P Q T | |
O P L M N Q T |
Question 9 Explanation:
The tree generated by using given pre-order and in-order traversal is
Thus, L N M O Q P T will be the post-order traversal.
Question 10 [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER] |
For a binary tree the first node visited in in-order and post-order traversal is same.
True | |
False |
Question 10 Explanation:
Consider a binary tree,
Its in-order traversal - 13 14 16 19
Its post-order traversal- 14 13 19 16. Here the first node visited is not same.
There are 10 questions to complete.