EG 724 - Algorithm Design - Spring 2003
Project 1 - Priority Queue


Loyola College > Department of Computer Science > EG 724 > Projects > Project 1

Due

Wednesday, March 11 12th at 11:59pm. Late projects will be assessed a 20% penalty for each day past the due date. Projects will not be accepted more than four days past the due date.

Objectives

Assignment

Write a class called PriorityQueue in the language of your choice (C++ and Java are encouraged). Your class should support the following operations

Suggestions

In order for changePriority to work in O(log n) time, you will need some way of finding items in the heap. You can do this by maintaining an auxilliary structure that maps items to indices in the heap. It would be best if lookups in that table operate in O(1) time under reasonable assumptions.

Files

Grading

For full credit, your code must follow the guidelines given below.

The following files were used for grading. The main method implements Prim's MST algorithm on a graph read from standard input. The .dat files are the inputs.

Submissions

Submit all source code files necessary to build your code, a version of the test driver supplied above modified for the language you're working in, and an explanation of how to modify your code to work with different classes.