Function aoc::year2015::day17::combinations

source ยท
fn combinations(
    state: &mut State,
    index: usize,
    containers: usize,
    litres: u32,
    factor: u32,
)
Expand description

Recursively try every possible combination, returning early if the size exceeds 150 litres.

state: Convenience struct to reduce parameters index: Current container containers: Number of containers used so far litres: How many litres of eggnog stored so far factor: The total different number of ways of selecting previous containers