Construct a tree from pre and inorder traversal