Expand description
This is my solution for Advent of Code - Day 3: Mull It Over
Most of todayβs heavy lifting is done by the parser extract_instructions
. Part one is solved by sum_muls
which cherry-picks all the Mul
instructions. sum_instructions
extends that by respecting Do
and
Dont
instructions.
EnumsΒ§
- Instruction πThe possible instructions that can be extracted from the input string
FunctionsΒ§
- extract_
instructions πUses a [Regex
] to extract specificInstruction
s from the input string. - parse_
named_ πgroup Helper for parsing a specified Regex capturing group as a number - The entry point for running the solutions with the βrealβ puzzle input.
- sum_
instructions π - sum_
muls πSolution to part 1. Sums the results of applying allMul
instructions