Home » Programming & Data Structure » Programming and data structure miscellaneous » Question

Programming and data structure miscellaneous

Programming & Data Structure

  1. Which of the following is/are correct inorder traversal sequence(s) of binary search tree(s) ?
    I. 3, 5, 7, 8, 15, 19, 25 II. 5, 8, 9, 12, 10, 15, 25
    III. 2, 7, 10, 8, 14, 16, 20 IV. 4, 6, 7, 9, 18, 20, 25
    1. I and IV only
    2. II and iii only
    3. II and IV only
    4. II only
Correct Option: A

In-order traversal of binary search tree gives ascending orders and in BST, at every node root element is greater than and equal to all element present in left sub-tree and less than or equal to all the elements in right subtree.



Your comments will be displayed only after manual approval.