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

Function permute

src/general/permutations/naive.rs:6–20  ·  view source on GitHub ↗

Here's a basic (naive) implementation for generating permutations

(arr: &[T])

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 4

test_3_different_valuesFunction · 0.70
test_some_elementsFunction · 0.70
test_unique_valuesFunction · 0.70

Calls 3

permute_recurseFunction · 0.85
is_emptyMethod · 0.45
lenMethod · 0.45

Tested by 4

test_3_different_valuesFunction · 0.56
test_some_elementsFunction · 0.56
test_unique_valuesFunction · 0.56