I'm trying to make the postorder of binary tree from its preorder and inorder traversal. but i don't have any idea how am i suppose to do that and what should be the structure of my code. any help can be useful.
for example :
input:
preorder : 6 2 1 4 3 5 7 9 8
inorder : 1 2 3 4 5 6 7 8 9
output:
post-order:1 3 5 4 2 8 9 7 6