logo

Question detail

Consider this tree: M is the root; M has left child F and right child T; F has left child C and right child H; T has left child R and right child W. What is the pre-order traversal?

Try the question, check the answer, then read the explanation to understand the curriculum point.

At a glance

MCQ

Type

practice

Style

Topic

Tree-traversal

Exam-style question

Try this first

Consider this tree: M is the root; M has left child F and right child T; F has left child C and right child H; T has left child R and right child W. What is the pre-order traversal?.

  1. A.M, F, C, H, T, R, W
  2. B.C, F, H, M, R, T, W
  3. C.C, H, F, R, W, T, M
  4. D.M, T, W, R, F, H, C

Model answer

What a good answer should say

  • M, F, C, H, T, R, W

Explanation

Why this works

Pre-order visits the current node first, then the left subtree, and then the right subtree. Starting at M gives M, F, C, H, T, R, W.

Common mistake

No common mistake is linked to this question yet.

Related flashcards

No flashcards are published for this page yet.

Related practice questions

No questions are published for this page yet.