Question discussion

Which traversal of binary search tree is in ascending order?I. Preorder traversalII. Postorder traversalIII. Inorder traversal

5238Medium DSSSB TGT Computer Science 0 replies 0 views
0
Which traversal of binary search tree is in ascending order?
I. Preorder traversal
II. Postorder traversal
III. Inorder traversal
  • AOnly III
  • BI and III
  • CII and III
  • DOnly II
Correct answer: A

Explanation

Inorder traversal (left, root, right) of a BST visits keys in ascending order; preorder and postorder do not.

Discussion 0

Nobody has replied yet. Start the discussion!