Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Go to Latest
method BinarySearchTree.from
Re-export
import { BinarySearchTree } from "https://deno.land/std@0.216.0/data_structures/mod.ts";

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

Parameters

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

Parameters

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

Parameters

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