Lecture 6 - Slide 11 : 40
A priority queue example

A priority queue is a heap

top() returns the largest element in the queue

We show an example of a priority queue of points, which is built on top of double-ended queue

A priority queue relies on a comparison function - in our case the overloaded   <   operator in class Point

A priority queue is an adoptor of an underlying container - defaulted to vector - in the example below we use deque

pri-queue-1.cpp
Illustration of priority_queue<Point, deque<Point> >.
point.h
Class point with an overloaded operator<.
point.cc
The implementation of class Point and in particular operator<.