Crates.io | teardown_tree___treap |
lib.rs | teardown_tree___treap |
version | 0.0.2 |
source | src |
created_at | 2016-12-10 02:30:32.52701 |
updated_at | 2016-12-10 02:38:31.673762 |
description | Do not use - intended for internal use of teardown_tree crate |
homepage | https://github.com/mbudde/treap-rs |
repository | https://github.com/mbudde/treap-rs |
max_upload_size | |
id | 7525 |
size | 25,647 |
A randomized treap implementation.
extern crate treap;
use treap::TreapMap;
fn main() {
let mut t = TreapMap::new();
for i in 0..10 {
t.insert(i, i);
}
for (k, v) in &mut t {
*v = *v * *v;
}
assert_eq!(t.get(&5), Some(&25));
assert_eq!(t.remove(&3), Some(9));
}
Add this to your Cargo.toml
:
[dependencies]
treap = "*"
and this to your crate root:
extern crate treap;