Home »
MCQs »
Discrete Mathematics MCQs
Discrete Mathematics | Binary Trees Traversal MCQs
Discrete Mathematics | Binary Trees Traversal MCQs: This section contains multiple-choice questions and answers on Binary Trees Traversal in Discrete Mathematics.
Submitted by Anushree Goswami, on October 23, 2022
1. The act of traversing a tree involves visiting all its _____?
- Nodes
- Edges
- Vertices
- Endpoints
Answer: A) Nodes
Explanation:
The act of traversing a tree involves visiting all its nodes.
2. Binary trees can be traversed using _____ standard methods?
- Two
- Three
- Four
- Five
Answer: B) Three
Explanation:
Binary trees can be traversed using three standard methods.
3. What is/are the standard method(s) to traverse the binary trees?
- Preoder Traversal
- Postorder Traversal
- Inorder Traversal
- All of the above
Answer: D) All of the above
Explanation:
The standard methods to traverse the binary trees are -
- Preoder Traversal
- Postorder Traversal
- Inorder Traversal
4. Binary trees are traversed recursively in ____?
- Preorder
- Postorder
- Inorder
- All of the above
Answer: D) All of the above
Explanation:
Binary trees are traversed recursively in preorder, postorder and inorder.
5. There are following ways to traverse a tree in preorder -?
- Visit the tree's root.
- Visit the preorder subtree on the left.
- Visit the postorder subtree on the right.
Select the correct order -
- ii > i > iii
- iii > ii > i
- i > ii > iii
- i > iii > ii
Answer: C) i > ii > iii
Explanation:
The correct order to traverse a tree in preorder is -
- Visit the tree's root.
- Visit the preorder subtree on the left.
- Visit the postorder subtree on the right
6. There are following ways to traverse a tree in postorder -?
- Visit the tree's root.
- Visit the preorder subtree on the left
- Visit the postorder subtree on the right
Select the correct order -
- iii > ii > i
- ii > iii > i
- i > ii > iii
- i > iii > ii
Answer: B) ii > iii > i
Explanation:
The correct order to traverse a tree in postorder -
- Visit the tree's root.
- Visit the preorder subtree on the left.
- Visit the postorder subtree on the right
7. There are following ways to traverse a tree in inorder -?
- Visit the tree's root.
- Visit the preorder subtree on the left.
- Visit the postorder subtree on the right.
Select the correct order -
- iii > ii > i
- ii > iii > i
- i > ii > iii
- ii > i > iii
Answer: D) ii > i > iii
Explanation:
The correct order to traverse a tree in postorder -
- Visit the preorder subtree on the left.
- Visit the tree's root.
- Visit the postorder subtree on the right.