import { BSTree } from "https://deno.land/std@0.143.0/collections/bs_tree.ts";
An unbalanced binary search tree. The values are in ascending order by default, using JavaScript's built in comparison operators to sort the values.
Methods
Adds the value to the binary search tree if it does not already exist in it. Returns true if successful.
Returns an iterator that uses in-order (LNR) tree traversal for retrieving values from the binary search tree.
Returns an iterator that uses post-order (LRN) tree traversal for retrieving values from the binary search tree.
Returns an iterator that uses level order tree traversal for retrieving values from the binary search tree.
Returns an iterator that uses pre-order (NLR) tree traversal for retrieving values from the binary search tree.
Returns an iterator that uses reverse in-order (RNL) tree traversal for retrieving values from the binary search tree.
Returns an iterator that uses in-order (LNR) tree traversal for retrieving values from the binary search tree.