import { BinaryHeap } from "https://deno.land/x/collections@v0.5.2/mod.ts";
A priority queue implemented with a binary heap. The heap is in decending order by default, using JavaScript's built in comparison operators to sort the values.
Properties
private
data: T[]Methods
[Symbol.iterator](): IterableIterator<T>
Static Methods
from<T, U>(collection: ArrayLike<T> | Iterable<T>): BinaryHeap<U>
Creates a new binary heap from an array like or iterable object.
from<T, U>(collection: ArrayLike<T> | Iterable<T>, options: { compare?: compare<U>; }): BinaryHeap<U>