[Skip to Body]
Primary:
[Front Door]
[Current]
[Glance]
-
[Honesty]
[Links]
[Syllabus]
Groupings:
[EBoards]
[Examples]
[Exams]
[Handouts]
[Homework]
[Labs]
[Outlines]
[Readings]
[Reference]
Misc:
[SamR]
[Java 1.4.2 API]
[EIJ]
[CS152 2000F]
[CS153 2004S]
Back to Preparation for Exam 2. On to Project Discussion.
Held: Monday, 1 November 2004
Summary: Today we investigate priority queues, linear structures in which the policy is highest-priority first, which usually translates into smallest first.
Related Pages:
Assignments
Notes:
Overview:
get returns the highest-priority object.
Comparable, we use the compareTo method associated with those objects.
Comparator to use when we create the priority queue.
Comparator). Presumably, the comparator should be a parameter to the constructor. How do we specify that in the interface?
PriorityQueue class, since there are different implementation.
abstract.
abstract (unless they are implicitly taken from an interface).
LinkedQueue. When inserting, look at each node in turn until you find the correct place.
put. When you get an element, search for the smallest.
Back to Preparation for Exam 2. On to Project Discussion.
[Skip to Body]
Primary:
[Front Door]
[Current]
[Glance]
-
[Honesty]
[Links]
[Syllabus]
Groupings:
[EBoards]
[Examples]
[Exams]
[Handouts]
[Homework]
[Labs]
[Outlines]
[Readings]
[Reference]
Misc:
[SamR]
[Java 1.4.2 API]
[EIJ]
[CS152 2000F]
[CS153 2004S]
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 Wed Dec 8 10:37:22 2004.
The source to the document was last modified on Thu Aug 26 20:22:23 2004.
This document may be found at http://www.cs.grinnell.edu/~rebelsky/Courses/CS152/2004F/Outlines/outline.34.html.
You may wish to
validate this document's HTML
;
;
Check with Bobby