Question: Heaps with Links, Analysis of algorithm Heaps with links In class we showed how heaps can be implemented using an array. In this problem we
Heaps with Links, Analysis of algorithm

Heaps with links In class we showed how heaps can be implemented using an array. In this problem we consider using an implementation using pointers (a) Consider storing a heap as a linked binary tree with pointers. Give pseudo- code on how you would store a heap node, and which modifications you need to make to the heap routines that we discussed in class. What are the runtimes of the heap routines (b) Now consider storing a heap as a linked list with pointers. Give pseudo-code on how you would store a heap node, and which modifications you need to make to the heap routines that we discussed in class. What are the runtimes of the heap routines (c) Which of the three heap implementations (array, linked tree, linked list) is preferable? Justify your
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
