…....….…..….…..……...…..

Dark Mode

11 votes

Best answer

Preorder traversal of BST $: 15,10,12,11,20,18,16,19$

In Pre-order, the first node is ROOT. So root is $15.$

In Post-order, the last node is ROOT. So in the Post-order sequence, $15$ must be at last.

In Pre-order, the second node is the left child of ROOT, if it is less than the root.

**Sequence**$: 10,12,11$** belongs to the left sub-tree of ROOT.**

$10,12,11$ is a Preorder of BST -- repetitively apply the steps.

In the Pre-order, the nodes which are greater than ROOT are on the right side of ROOT.

**Sequence**$: 20,18,16,19$** belongs to the right sub-tree of ROOT.**

$20,18,16,19$ is a Preorder of BST -- repetitively apply the steps.

Finally we will get $11,12,10,16,19,18,20,15$ as Postorder.