function PriorityQueue() {
  this._arr = [];
  this._keyIndices = {};
}
A min-priority queue data structure. This algorithm is derived from Cormen,
et al., "Introduction to Algorithms". The basic idea of a min-priority
queue is that you can efficiently (in O(1) time) get the smallest key in
the queue. Adding and removing elements takes O(log n) time. A key can
have its priority decreased in O(log n) time.