Q. Construct a binary tree whose nodes in inorder and preorder are written as follows:
Inorder : 10, 15, 17, 18, 20, 25, 30, 35, 38, 40, 50
Preorder: 20, 15, 10, 18, 17, 30, 25, 40, 35, 38, 50
Ans:
Construction of a Binary tree whose nodes in inorder and preorder are written as follows:-
Inorder:- 10, 15, 17, 18, 20, 25, 30, 35, 38, 40, 50
Preorder:- 20, 15, 10, 18, 17, 30, 25, 40, 35, 38, 50