Skip to main content

permutations

Function permutations 

Source
fn permutations(slice: &mut [i64], callback: impl FnMut(&[i64]))
Expand description

Generates all possible permutations of a mutable slice, passing them one at a time to a callback function. Uses Heap’s algorithm for efficiency, modifying the slice in place.