algorithmz 1.1.5

This is the corresponding implemenation of the python module of the same name.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use algorithmz::set::RandomizedSet;

#[test]
fn test_randomized_set() {
    let mut rs = RandomizedSet::new();
    rs.insert(10);
    rs.insert(20);
    rs.insert(30);
    assert_eq!(rs.elements.len(), 3);
    assert!(rs.index_map.contains_key(&10));
    assert!(rs.index_map.contains_key(&20));
    assert!(rs.index_map.contains_key(&30));
}