Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/collections/trees/bs_tree.ts>BSTree.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
Go to Latest
method BSTree.from
import { BSTree } from "https://deno.land/x/collections@v0.10.1/trees/bs_tree.ts";

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

Parameters

collection: ArrayLike<T> | Iterable<T>

Parameters

collection: ArrayLike<T> | Iterable<T>
options: { Tree?: BSTree; Node?: BSNode; compare?: compare<Partial<U>> | compareDefined<Partial<U>>; }

Parameters

collection: ArrayLike<T> | Iterable<T>
options: { Tree?: BSTree; Node?: BSNode; compare?: compare<Partial<U>> | compareDefined<Partial<U>>; map: mapDefined<T, U>; thisArg?: V; }