Postorder Inorder to Preorder conversion without constructing Binary Tree

I have got given postorder and inorder. My task is to print preorder, but I can't construct a binary tree. Example: In: POSTORDER 4 2 7 5 9 8 6 3 1 INORDER 4 2 1 5 7 3 6 8 9 Out: 1 2 4 3 5 7 6 8...