MCPcopy Create free account
hub / github.com/StudyRust/leetcode_rust / permute

Method permute

46-permutations.rs:16–20  ·  view source on GitHub ↗
(mut path: Vec<i32>)

Source from the content-addressed store, hash-verified

14
15impl Solution {
16 pub fn permute(mut path: Vec<i32>) -> Vec<Vec<i32>> {
17 let mut ret = vec![];
18 Self::backtrack(&mut path, &mut ret, 0);
19 ret
20 }
21
22 fn backtrack(path: &mut Vec<i32>, ans: &mut Vec<Vec<i32>>, begin: usize) {
23 if begin == path.len() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected