Function aoc::year2019::day14::topological

source ยท
fn topological(
    reactions: &[Reaction],
    order: &mut [usize],
    chemical: usize,
    depth: usize,
)
Expand description

Sort reactions in topological order from FUEL at the root to ORE at the leaves. Reactions may occur more than once at different depths in the graph, so we take the maximum depth.