avl-cont

Crates.ioavl-cont
lib.rsavl-cont
version0.1.5
sourcesrc
created_at2023-04-18 00:15:30.501523
updated_at2023-04-26 03:32:52.805686
descriptionA contiguous AVL Tree.
homepagehttps://github.com/tonijarjour/avl-cont
repositoryhttps://github.com/tonijarjour/avl-cont
max_upload_size
id841974
size54,618
Toni Jarjour (tonijarjour)

documentation

README

avl-cont

A contiguous AVL Tree. Written by Toni Jarjour.

let mut tree = binary_search::Tree::default();

// Insert values.
for n in 0..1000 {
    tree.insert(n);
}

// Remove a value.
assert_eq!(tree.remove(511).unwrap(), 511);
assert_eq!(tree.contains(511), None);

// Check if a value is in the tree, returns its index.
let value_index = tree.contains(732).unwrap();

// Get a reference to the value.
assert_eq!(tree.get(value_index).unwrap(), &732);
Commit count: 13

cargo fmt