Problem
It is known that an in-order traversal and a pre-order traversal can be used to uniquely identify a binary tree. For a binary tree with six nodes A, B, D, E, F and G, assume the pre-order traversal is ABDEFG and the in-order traversal is BAEDGF, can you draw this binary tree? Provide pseudo code for your algorithm to identify a binary tree based on its in-order and pre-order traversals. Use the revise side if necessary.