Fund. CS II (CS152 2006S)

Homework 13: Implementing Priority Queues

Assigned: Tuesday, March 14, 2006
Due: 8:00 a.m., Wednesday, March 15, 2006

Summary: In this assignment, you will consider how to implement priority queues.

Purposes: To help you think about implementing ADTs.

Contents:

The Assignment

A priority queue is a linear structure in which the get operation removes the smallest value in the structure.

You now know a variety of techniques for implementing collection ADTs, including placing the values in an array, placing the values in a group of linked nodes, and variations on the two.

In English (with approximate code, as necessary), suggest how you might implement priority queues. That is, you should describe the underlying representation as well as the implementations of the put and get methods.

Submitting Your Work

Email me your answer. Make sure that the answer is in the body of the email and is not an attachment.

 

History

Monday, 13 March 2006 [Samuel A. Rebelsky]

Tuesday, 14 March 2006 [Samuel A. Rebelsky]

 

Disclaimer: I usually create these pages on the fly, which means that I rarely proofread them and they may contain bad grammar and incorrect details. It also means that I tend to update them regularly (see the history for more details). Feel free to contact me with any suggestions for changes.

This document was generated by Siteweaver on Tue May 9 08:31:12 2006.
The source to the document was last modified on Tue Mar 14 10:30:12 2006.
This document may be found at http://www.cs.grinnell.edu/~rebelsky/Courses/CS152/2006S/Homework/hw.13.html.

You may wish to validate this document's HTML ; Valid CSS! ; Check with Bobby

Samuel A. Rebelsky, rebelsky@grinnell.edu