The inorder and preorder traversal of a binary tree are d b e a f c g and a b d e c f g, respectively. The postorder traversal of the binary tree is:
Answers
Answered by
11
the postorder traversal of the binary tree is d e b f g c a
Answered by
7
Answer:
The post order traversal of the binary tree is d e b f g c a
Explanation:
The algorithm for inorder, preorder and post order traversal is given below:
Inorder Traversal traverse the left subtree then visit the root and then traverse the right subtree.
Preorder traversal Visit the root first, traverse the left subtree and then traverse the right subtree.
Post Traversal Traverse the left subtree and then Traverse the right subtree and finally visit the root.
So in this problem, d e b f g c a is printed based on the left->right->Root
Similar questions