Skip to main content
Go to Latest
method BinaryHeap.from
import { BinaryHeap } from "https://deno.land/std@0.147.0/collections/binary_heap.ts";

Creates a new binary heap from an array like or iterable object.

Parameters

collection: ArrayLike<T> | Iterable<T> | BinaryHeap<T>

Parameters

collection: ArrayLike<T> | Iterable<T> | BinaryHeap<T>
options: { compare?: (a: T, b: T) => number; }

Parameters

collection: ArrayLike<T> | Iterable<T> | BinaryHeap<T>
options: { compare?: (a: U, b: U) => number; map: (value: T, index: number) => U; thisArg?: V; }

Parameters

collection: ArrayLike<T> | Iterable<T> | BinaryHeap<T>
optional
options: { compare?: (a: U, b: U) => number; map?: (value: T, index: number) => U; thisArg?: V; }