redblackbst

Crates.ioredblackbst
lib.rsredblackbst
version0.1.1
sourcesrc
created_at2019-10-16 06:56:12.778192
updated_at2019-10-24 04:36:32.413774
descriptionRust Algorithms
homepagehttps://github.com/AbrarNitk/algorithmica
repositoryhttps://github.com/AbrarNitk/algorithmica
max_upload_size
id172914
size7,569
Abrar Khan (AbrarNitk)

documentation

https://github.com/AbrarNitk/algorithmica

README

Red-Black Binary Search Tree

How to use

use redblackbst;
fn how_use() {
    let mut bst = redblackbst::RedBlackBST::new();
    bst.put(3, "1");
    bst.put(2, "2");
    bst.put(1, "3");
    assert_eq!(bst.size(), 3);
    assert_eq!(bst.get(1), Some(&"3"));
    assert_eq!(bst.get(4), None);
}

Functions added in version 0.1.1

  1. height
  2. is_empty
  3. min
  4. max
Commit count: 143

cargo fmt