import { BinaryHeap } from "https://deno.land/x/structurae@4.0.1/binary-heap.ts";
Extends Array to implement the Binary Heap data structure. // TODO (docs) document priority queue operations // todo add heapsort?
Methods
Static Methods
from<T>(iterable: Iterable<T> | ArrayLike<T>): BinaryHeap<T>
Creates a new BinaryHeap from a given array-like object.
of<T>(...elements: Array<T>): BinaryHeap<T>
Creates a new BinaryHeap with a variable number of arguments, regardless of number or type of the arguments.