## Creation of Binary Tree from Preorder to Inorder

**Steps**

- Scan Preorder traversal from L->R.
- For each node scanned locate its position in inorder traversal, let the scanned node be x.
- The node proceeding x in-order from its left subtree and node succeeding it is from its right subtree.
- Repeat step 1 to 3 for each symbol in preorder.

**Node A**

**Node B**

**Node D**

**Node H**

**Node E**

**Node C,F G**

**Final Inorder Traversal Tree**

## Creation of Binary Tree from Post-order to In-order

Steps :

- Scan Postorder traversal from R->L.
- For each node scanned locate its position in inorder traversal, let the scanned node be x.
- The node proceeding x in-order from its left subtree and node succeeding it’s from its right subtree.
- Repeat step 1 to 3 for each symbol in preorder.

Given that :

**Node A**

**Node E**

**Node F**

**Node H**

**Node C**

**Node G**

**Node B**

**Node D**

**Final Inorder Traversal Tree**