ds-bst 0.3.0

Binary search tree implementation
Documentation
  • Coverage
  • 0%
    0 out of 2 items documented0 out of 0 items with examples
  • Size
  • Source code size: 11.53 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.54 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 9s Average build duration of successful builds.
  • all releases: 9s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • iapain/rust-bst
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • iapain

Binary Search Tree

Implements a Binary Search Tree in Rust. This is a recursive data structure and left and right refers to sub trees.

Installation

In your cargo dependencies add following

ds-bst = "*"
use ds_bst::BinarySearchTree;

let mut node = BinarySearchTree:new(5);
node.insert(1);
node.insert(2);
node.insert(10);
// or

let mut root = BinarySearchTree::from(vec![1,2,3,4,5,6,7,8,9]);
root.insert(10);
let ordered: Vec<_> = root.inorder();
let min = root.find_min();
let max = root.find_max();