How do you determine the binary tree sequence, given the postorder and inorder sequences?
Example:
Postorder: GROLHMTIA
Inorder: GLROAIHTM
I need an algorithm that will give me the binary tree structure.
This is a discussion on btree structure given postorder and inorder within the C Programming forums, part of the General Programming Boards category; How do you determine the binary tree sequence, given the postorder and inorder sequences? Example: Postorder: GROLHMTIA Inorder: GLROAIHTM I ...
How do you determine the binary tree sequence, given the postorder and inorder sequences?
Example:
Postorder: GROLHMTIA
Inorder: GLROAIHTM
I need an algorithm that will give me the binary tree structure.
Well , check the Internet and Data Structure books this is a common binary tree homwork problem.
1. What is a binary tree?
2. Look at the traversals
3. draw the tree.
I can give you some name of books that can help solve the program if you wish,
Mr. C: Author and Instructor