MCPcopy Create free account
hub / github.com/TheAlgorithms/Rust / permute

Function permute

src/backtracking/permutations.rs:14–23  ·  view source on GitHub ↗

This module provides a function to generate all possible distinct permutations of a given collection of integers using a backtracking algorithm. Generates all possible distinct permutations of a given vector of integers. # Arguments `nums` - A vector of integers. The input vector is sorted before generating permutations to handle duplicates effectively. # Returns A vector containing all possib

(mut nums: Vec<isize>)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 1

generateFunction · 0.70

Tested by

no test coverage detected