Reading material

If you use the first edition of the textbook, follow the reading material in orange. If you use the second edition, follow the reading material in brown.

(1st) pages 221-230 (Section 6.3.2-6.3.3), pages 246-250 (Section 7.1)

(2nd) pages 297-310 (Section 7.2.2-7.3.2), pages 334-338 (Section 8.1)

Additional material

Assume we have the following heap.

Removing the minimal element takes the following steps.

Inserting an element with key 8 takes the following steps.

Implementation of a priority queue with a heap in pseudocode: PostScript and PDF

PriorityQueue
HeapPriorityQueue
PriorityQueueFullException

Dictionary

Question

Write the interface EqualityTester and implement the interface for Integer keys.