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

Function list_subset

src/dynamic_programming/subset_generation.rs:4–38  ·  view source on GitHub ↗

list all subset combinations of n element in given set of r element. This is a recursive function that collects all subsets of the set of size n with the given set of size r.

(
    set: &[i32],
    n: usize,
    r: usize,
    index: usize,
    data: &mut [i32],
    i: usize,
)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 4

test_print_subset3Function · 0.85
test_print_subset4Function · 0.85
test_print_subset5Function · 0.85

Calls 2

pushMethod · 0.80
iterMethod · 0.45

Tested by 4

test_print_subset3Function · 0.68
test_print_subset4Function · 0.68
test_print_subset5Function · 0.68