Skip to main content
Module

x/collections/mod.ts>RBTree.from

Collection data structures that are not standard built-in objects in JavaScript. This includes a vector (double-ended queue), binary heap (priority queue), binary search tree, and a red black tree.
Very Popular
Latest
method RBTree.from
import { RBTree } from "https://deno.land/x/collections@0.12.1/mod.ts";

Creates a new red-black tree from an array like or iterable object.

Parameters

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

Parameters

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

Parameters

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