Options for a PriorityQueue.
PriorityQueue
const longestFirst: PriorityQueueOptions<string> = { comparator: (a, b) => b.length - a.length }const tasks = new PriorityQueue<string>(longestFirst) Copy
const longestFirst: PriorityQueueOptions<string> = { comparator: (a, b) => b.length - a.length }const tasks = new PriorityQueue<string>(longestFirst)
Optional
The order of the queue: poll() returns an element for which no other element compares less. Natural order (numbers, strings, bigints, booleans, dates or [compareSymbol] objects) when omitted.
poll()
[compareSymbol]
Options for a
PriorityQueue.Example