Which traversal visits the root node before its left and right subtrees?

Options

  • A. Inorder
  • B. Postorder
  • C. Preorder
  • D. More than one of the above
  • E. None of the above

Correct Answer (Detailed Explanation is Below)

C. Preorder

Detailed Explanation

Preorder traversal follows the sequence Root → Left subtree → Right subtree. Because the root is processed first, preorder is useful in situations such as creating a copy of a tree or representing hierarchical structures. In comparison, inorder follows Left → Root → Right, while postorder follows Left → Right → Root. For a Binary Search Tree, inorder traversal is particularly important because it produces the stored values in sorted order.