Say preorder is {7,10,4,3,1,2,8,11} and inorder is {4,10,3,1,7,11,8,2}. now to construct a binary tree, we know the first element of preorder has to be the root, because preorder is root,left,right. So find the position of the root i.e., first element of preorder in inorder array, we therefore know that the left of the position in inorder has to be the left of the binary tree as inorder is left, root, right. So, we found out, root, left and right. Now, we can just recurse through rest of the array as we did above to find out the subtrees of binary tree. Hence, solved.