Loading RustViz Engine...
Separate a list into even and odd collections using Iterator::partition in one pass.
This problem is currently in blueprint template mode. Once the concept foundation is finalized, live in-browser WebAssembly compilation and test assertion runners will be enabled here.
pub fn partition_even_odd(nums: Vec<i32>) -> (Vec<i32>, Vec<i32>) {
nums.into_iter().partition(|&n| n % 2 == 0)
}