Question

Suppose the following values are inserted into a binary tree, in the order given: 12, 7,...

Suppose the following values are inserted into a binary tree, in the order given:

12, 7, 9, 10, 22, 24, 30, 18, 3, 14, 20

Draw a diagram of the resulting binary tree,

How would the values in the tree you sketched for question above be displayed in an in-order, pre-order, and post-order traversals?

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

in-order:   3, 7, 9, 10, 12, 14, 18, 20, 22, 24, 30
pre-order:  12, 7, 3, 9, 10, 22, 18, 14, 20, 24, 30
post-order: 3, 10, 9, 7, 14, 20, 18, 30, 24, 22, 12
Add a comment
Know the answer?
Add Answer to:
Suppose the following values are inserted into a binary tree, in the order given: 12, 7,...
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