×

Multiple-Choice Questions

Web Technologies MCQs

Computer Science Subjects MCQs

Databases MCQs

Programming MCQs

Testing Software MCQs

Digital Marketing Subjects MCQs

Cloud Computing Softwares MCQs

AI/ML Subjects MCQs

Engineering Subjects MCQs

Office Related Programs MCQs

Management MCQs

More

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 _____?

  1. Nodes
  2. Edges
  3. Vertices
  4. 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?

  1. Two
  2. Three
  3. Four
  4. 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?

  1. Preoder Traversal
  2. Postorder Traversal
  3. Inorder Traversal
  4. All of the above

Answer: D) All of the above

Explanation:

The standard methods to traverse the binary trees are -

  1. Preoder Traversal
  2. Postorder Traversal
  3. Inorder Traversal

4. Binary trees are traversed recursively in ____?

  1. Preorder
  2. Postorder
  3. Inorder
  4. 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 -?

  1. Visit the tree's root.
  2. Visit the preorder subtree on the left.
  3. Visit the postorder subtree on the right.

Select the correct order -

  1. ii > i > iii
  2. iii > ii > i
  3. i > ii > iii
  4. i > iii > ii

Answer: C) i > ii > iii

Explanation:

The correct order to traverse a tree in preorder is -

  1. Visit the tree's root.
  2. Visit the preorder subtree on the left.
  3. Visit the postorder subtree on the right

6. There are following ways to traverse a tree in postorder -?

  1. Visit the tree's root.
  2. Visit the preorder subtree on the left
  3. Visit the postorder subtree on the right

Select the correct order -

  1. iii > ii > i
  2. ii > iii > i
  3. i > ii > iii
  4. i > iii > ii

Answer: B) ii > iii > i

Explanation:

The correct order to traverse a tree in postorder -

  1. Visit the tree's root.
  2. Visit the preorder subtree on the left.
  3. Visit the postorder subtree on the right

7. There are following ways to traverse a tree in inorder -?

  1. Visit the tree's root.
  2. Visit the preorder subtree on the left.
  3. Visit the postorder subtree on the right.

Select the correct order -

  1. iii > ii > i
  2. ii > iii > i
  3. i > ii > iii
  4. ii > i > iii

Answer: D) ii > i > iii

Explanation:

The correct order to traverse a tree in postorder -

  1. Visit the preorder subtree on the left.
  2. Visit the tree's root.
  3. Visit the postorder subtree on the right.




Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.