#round-robin #merge #vector #style #values #single

robin_merge

A Rust crate for merging vectors round-robin style

2 releases

Uses old Rust 2015

0.1.1 Dec 7, 2022
0.1.0 Dec 7, 2022

#2425 in Algorithms

MIT license

4KB

robin_merge

Crates.io Docs

robin_merge is a Rust crate for merging vectors round-robin style.

Example

robin_merge::merge_vectors merges a vector of vectors of values into a single vector of values round-robin style. The type of the values in the vectors must implement Copy.

let vec_1 = vec![1,2];
let vec_2 = vec![3,4];
let merged = robin_merge::merge_vectors(&vec![vec_1, vec_2]);
assert_eq!(merged, vec![1,3,2,4])

No runtime deps