* Adds an element to the queue * @param {*} key * @param {number} priority
(key, priority)
| 43 | * @param {number} priority |
| 44 | */ |
| 45 | push(key, priority) { |
| 46 | this._heap.push(key) |
| 47 | this.priorities.set(key, priority) |
| 48 | this._shiftUp(this._heap.length - 1) |
| 49 | } |
| 50 | |
| 51 | /** |
| 52 | * Removes the element with least priority |
no test coverage detected