Create tree using preorder and inorder traversal

please explain the output of the problem

@Bansaljatin05 from given preorder and inorder traversal you have to make the tree and print them as following:
starting from root for every node
print root.left then give “=>” then print root then give “<=” then print root.right.(if root.right or root.left does not exsit then print END in place of them).
then go to the left subtree and do the same after go to right subtree and do the same.

1 Like