Constructor of Priority Queue, with the given 'comparator'. 'comparator' should be same as Array.prototype.sort's argument. Like this: (a, b) => (a == b ? 0 : (a < b ? -1 : 1)); If not, default function will be passed by PriorityQueue entrypoint.
Optional
Build priority queue from given array.
Generated using TypeDoc
Constructor of Priority Queue, with the given 'comparator'. 'comparator' should be same as Array.prototype.sort's argument. Like this: (a, b) => (a == b ? 0 : (a < b ? -1 : 1)); If not, default function will be passed by PriorityQueue entrypoint.