PRASHNIKAप्रश्निका
‹ Back to the paper

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

Computer Science20251 markMCQ
  • aPost order
  • bPre order
  • cIn order
  • dPostfix order
Binary Tree
Binary Tree

Answer

Answer

AI

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.
Data structures

From ISC Computer Science - Competency Focused Practice Questions (CISCE, August 2024), question 19.