teardown_tree___treap

Crates.ioteardown_tree___treap
lib.rsteardown_tree___treap
version0.0.2
sourcesrc
created_at2016-12-10 02:30:32.52701
updated_at2016-12-10 02:38:31.673762
descriptionDo not use - intended for internal use of teardown_tree crate
homepagehttps://github.com/mbudde/treap-rs
repositoryhttps://github.com/mbudde/treap-rs
max_upload_size
id7525
size25,647
Core (github:first-rust-competition:core)

documentation

http://mbudde.github.io/treap-rs/treap/index.html

README

treap-rs

Build Status

A randomized treap implementation.

Documentation

Example


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));
}

Usage

Add this to your Cargo.toml:

[dependencies]
treap = "*"

and this to your crate root:

extern crate treap;
Commit count: 64

cargo fmt