A simple priority queue implementation with O(n log n) sorting. The underlying data structure is a binary heap.
This implementation uses a binary heap where each node is less than or equal to its children. Nodes can be anything as long as they're comparable.
Like all priority queues, this implementation efficiently retrieves the minimum element (by comparative value) in the queue. You can also insert elements and delete elements if they are "labeled". (See examples below.)