in Unknown Category retagged by
1,803 views
0 votes
0 votes

Post-order traversal of a given binary search tree $T$ produces following sequence of keys: $3,5,7,9,4,17,16,20,18,15,14$. Which one of the following sequences of keys can be the result of an in-order traversal of the tree $T$?

  1. $3,4,5,7,9,14,20,18,17,16,15$
  2. $20,18,17,16,15,14,3,4,5,7,9$
  3. $20,18,17,16,15,14,9,7,5,4,3$
  4. $3,4,5,7,9,14,15,16,17,18,20$
in Unknown Category retagged by
by
1.8k views

3 Answers

1 vote
1 vote
Best answer
inorder traversal always gives sorted list in BST. therefore option D.

3,4,5,7,9,14,15,16,17,18,20
selected by
0 votes
0 votes
Option D

since given tree is BST

Inorder Traversal of BST is always key values of given nodes arranged in sorted ascending order.
0 votes
0 votes

Answer 4)

Inorder Traversal of BST is always a sorted (ascending) list.

2 Comments

Im unable to draw BST with given postorder
0
0

@ student2018 You can't draw BST directly from Postorder. You also need Inorder for that and that inorder is given in option 4.

P.S - Though to answer this question you need not draw BST.

0
0
Answer:

Related questions