Which traversal of a binary search tree visits the keys in ascending sorted order?
Correct answer D. Inorder
Explanation
Inorder traversal visits the left subtree, then the node, then the right subtree. In a BST every key on the left is smaller and every key on the right is larger, so this order outputs keys from smallest to largest. Preorder and level order start with the root, which is usually not the minimum, and postorder ends with the root.
Answer checked How we write and check questions
Discussion