| Crates.io | avl-cont |
| lib.rs | avl-cont |
| version | 0.1.5 |
| created_at | 2023-04-18 00:15:30.501523+00 |
| updated_at | 2023-04-26 03:32:52.805686+00 |
| description | A contiguous AVL Tree. |
| homepage | https://github.com/tonijarjour/avl-cont |
| repository | https://github.com/tonijarjour/avl-cont |
| max_upload_size | |
| id | 841974 |
| size | 54,618 |
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);