Prashnikaप्रश्निका
Code
About
‹ Back to the paper

Question 19

1 mark

Computer ScienceISC Computer Science - Competency Focused Practice Questions (CISCE, August 2024)MCQData structures

Choose the correct option.

For the given Binary Tree, which traversal order will arrange the elements in ascending order?

  • (a)Post order
  • (b)Pre order
  • (c)In order
  • (d)Postfix order
Figure for this question
Open in the Binary tree and BST tool

Answer

Answer

Correct option: c

Answer: (c) In order. The given tree (root 4, left child 2, right subtree 7 with children 5 and 8, and 8's right child 9) is a binary search tree. An in-order traversal (left, root, right) of a BST always visits the nodes in ascending order: 2, 4, 5, 7, 8, 9.