Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Go to Latest
method RBTree.from
import { RBTree } from "https://deno.land/std@0.147.0/collections/rb_tree.ts";

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

Parameters

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

Parameters

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

Parameters

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

Parameters

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