Function advent_of_code_2021::day_24::analyse_program [−][src]
Expand description
First split the program into its 18-line sections. For each extract the three variables. Tracking what input + p values are on the stack, and where it is possible to avoid pushing to the stack, storing that as a condition.
Then iterate through these conditions working out where parts of the input are constrained by them and updating the
minimum and maximum numbers as appropriate. Finally return this minimum (part two) and maximum (part one).
