algorithmz 0.8.7

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
use algorithmz::queue::ZigZagIterator;

#[test]
fn test_zigzagiterator() {
    let mut it = ZigZagIterator::new(vec![1,2],vec![3,4,5]);
    let mut result = Vec::new();    
    while it.has_next() {
        result.push(it.next().unwrap());
    }
    assert_eq!(result,vec![1,3,2,4,5]);
}