Which traversal of a binary search tree gives elements in sorted order?

2026

Which traversal of a binary search tree gives elements in sorted order?

  1. A.

    Preorder

  2. B.

    Postorder

  3. C.

    Inorder

  4. D.

    Level order

Attempted by 227 students.

Show answer & explanation

Correct answer: C

The correct answer is Inorder traversal. This traversal visits the left subtree, then the root, and finally the right subtree, resulting in elements being visited in ascending sorted order for a Binary Search Tree.

Explore the full course: Niacl Ao It Specialist