MCPcopy Index your code
hub / github.com/TheAlgorithms/Rust / generate

Function generate

src/backtracking/permutations.rs:33–61  ·  view source on GitHub ↗

Helper function for the `permute` function to generate distinct permutations recursively. # Arguments `nums` - A reference to the sorted slice of integers. `current` - A mutable reference to the vector holding the current permutation. `used` - A mutable reference to a vector tracking which elements are used. `permutations` - A mutable reference to the vector holding all generated distinct permut

(
    nums: &[isize],
    current: &mut Vec<isize>,
    used: &mut Vec<bool>,
    permutations: &mut Vec<Vec<isize>>,
)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

permuteFunction · 0.70

Calls 3

pushMethod · 0.80
lenMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected