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.

icon
Related questions
Question
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.
Transcribed Image Text: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.
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer