rebuild tree from preorder and inorder