Question

Draw the binary tree whose inorder traversal is 'abcdefgh' and whose postorder is 'acbegfhd'.

Draw the binary tree whose inorder traversal is 'abcdefgh' and whose postorder is 'acbegfhd'.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Given
Inorder traversal is 'abcdefgh'
Postorder traversal is 'acbegfhd'

In Inorder the order of Traversal is first traverse Left subtree then after traverse Root and then traverse Right subtree Right

Inorder (Left, Root, Right) : 'abcdefgh'

In Postorder the order of Traversal is first traverse Left subtree then after traverse Right subtree and then traverse Root

Postorder (Left, Right, Root) : 'acbegfhd'

Binary Search Tree based on above Rules as follows

Add a comment
Know the answer?
Add Answer to:
Draw the binary tree whose inorder traversal is 'abcdefgh' and whose postorder is 'acbegfhd'.
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT