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

Function heap_permute

src/general/permutations/heap.rs:5–14  ·  view source on GitHub ↗

Computes all permutations of an array using Heap's algorithm Read `recurse_naive` first, since we're building on top of the same intuition

(arr: &[T])

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 3

test_3_different_valuesFunction · 0.85
test_some_elementsFunction · 0.85

Calls 3

heap_recurseFunction · 0.85
is_emptyMethod · 0.45
lenMethod · 0.45

Tested by 3

test_3_different_valuesFunction · 0.68
test_some_elementsFunction · 0.68