Question

A. Construct a heap for the list ( 2, 5, 6, 4, 3, 1, 8, 7...

A. Construct a heap for the list ( 2, 5, 6, 4, 3, 1, 8, 7 ) by the bottom-up algorithm

B. Construct a heap for the list ( 2, 5, 6, 4, 3, 1, 8, 7 ) by successive key imsertions (top-down algorithm)

C. Is is true that the bottom-up and top-dowj alogorthms yield the same heap for the same input?

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

A.

B.

C. As can be seen from the above example bottom-up and top-down algorithms do not yield the same heaps for same inputs.

Add a comment
Know the answer?
Add Answer to:
A. Construct a heap for the list ( 2, 5, 6, 4, 3, 1, 8, 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