Skip to content

kirillkh/treap-rs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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;

About

A randomized treap implementation in Rust

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 100.0%