Module aoc::year2016::day10

source ·
Expand description

§Balance Bots

Performs a topological sort of the bots, starting from raw values, passing through some number of bots then ending in an output.

We maintain a VecDeque of chips and destinations starting with raw inputs. Once each robot receives 2 chips then its low and high outputs are added to the queue.

As a minor optimization we only need to store the product of outputs 0, 1 and 2.

Structs§

Functions§

Type Aliases§