Given the following list of integers: 12,15,20,25 (a) Apply the BUILDHEAP procedure to this list, in a right-to-left scan. Draw appropriate trees each time the addition of a new element causes changes in the tree structure. (b) Now, sort the list obtained in part(a) in a series of exchange and heapify steps. Once again, draw appropriate trees to illustrate each exchange-heapify step.
Given the following list of integers: 12,15,20,25 (a) Apply the BUILDHEAP procedure to this list, in a right-to-left scan. Draw appropriate trees each time the addition of a new element causes changes in the tree structure. (b) Now, sort the list obtained in part(a) in a series of exchange and heapify steps. Once again, draw appropriate trees to illustrate each exchange-heapify step.
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 3 steps