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>>,
)