Project: Heaps and priority queues

1. Introduction

The goal of this project is to understand the heap data structure and its use in implementing the heapsort algorithm and the priority queue ADT.

This project is found in the book as Project 3.2 on page 234. The project description there is short because the discussion of heaps and priority queues in the text is very thorough. You may find you need to re-read parts of the section as you work through the project.

2. Set up

Make a folder for this project and copy the starter code from /homes/tvandrun/Public/cs345/heap and make a new project for it. The code is organized into typical folders adt, impl, and test, and the additional folder expr.

One thing that the project description in the book fails to mention is that you need to grab your implementation of ListSet from the adt-review project. Once you do that, make sure you run test.LSetTest as a sanity check.

3. The main stuff

Do parts a-e in the project, testing as you go.

4. Turn in

Copy the files you modified (Heap, HeapSorter, HeapPriorityQueue, PQQueue, and PQStack to your turn-in folder /cslab/class/cs345/(your id)/heap .

To keep up with the course, this should be finished by Feb 13.


Thomas VanDrunen
Last modified: Wed Jan 8 13:30:41 CST 2020