Known inorder traversal and postorder traversal, the establishment of binary tree nonrecursive algorithm design
topic
Known inorder traversal and postorder traversal, the establishment of binary tree nonrecursive algorithm design
analysis

Pointbypoint insertion method, insert the post sequence into the middle sequence.
Assume post sequence POSOD[0…n1], middle sequence is INOD[0…n1] 
When inserting, traverse each element of POSOD in reverse order

When inserting, it is actually to find the position of each element in the subsequent sequence in the middleorder data.
Code
Here is a screenshot of the code, if you want to see the source code, go here.
The specific path is this file in "pager/pager_1998.c" . When looking at the screenshot, pay attention to the number of lines of code.