Construct a binary tree from inorder and preorder traversals