Data Structures · Question 6 · Medium

An inorder traversal of a Binary Search Tree (BST) lists the keys in which order?

  1. Ascending sorted order
  2. Descending sorted order
  3. Level-by-level order
  4. The order in which keys were inserted
Answer and explanation

Answer: A. Ascending sorted order

Explanation: Inorder visits left subtree, root, right subtree. In a BST all left keys are smaller and all right keys are larger, so inorder gives ascending order.

Previous: Which data structure is used to implement Breadth-First Search (BFS) of a graph? · Next: What is the postfix form of the infix expression A + B * C - D ?

Practise data structures

Try a fresh set of data structures questions with an explanation after every answer, free and without signing up: Data Structures practice. Or sit a full placement mock test.

More data structures questions

More technical & programming practice

Algorithms · Object-Oriented Programming · DBMS · SQL · Operating Systems · Computer Networks · Software Engineering · Cloud & DevOps

LogicWiz Exams home · All practice topics · Placement mock tests · Daily 10 challenge