replace(value) {
        const replacedValue = this.peek();
        this._heap[0] = value;
        this._siftDown();
        return replacedValue;
    }
Replace the element with the highest priority in the queue with a new value.
@param {*} value The new value.
@returns {*} The replaced value.