constructor(comparator = (a, b) => a > b, maxSize = Infinity) {
        this._heap = [];
        this._comparator = comparator;
        this._maxSize = maxSize;
    }
Create a new PriorityQueue.
@param {function(any, any): boolean} comparator Comparator function to determine priority. Defaults to a MaxHeap.