1
0

Add solution for "Day 7: Laboratories", part 1 and 2

This commit is contained in:
Stefan Müller
2026-02-10 10:41:56 +01:00
parent 8496bcfdee
commit 7df6f2ab51
8 changed files with 71 additions and 3 deletions
+6
View File
@@ -50,6 +50,12 @@ From the input data, we construct a [`MultiInterval`](src/common/interval.rs), w
We implement two different ways to collect numbers from the input. For part 1, numbers separated by space are read line by line, stored in a two-dimensional array and then aggregated in columns. While for part 2, each column of characters in the input data represents a number, and empty columns are interpreted as the separators between blocks for aggregation.
### Day 7: Laboratories
:mag_right: Puzzle: <https://adventofcode.com/2025/day/7>, :white_check_mark: Solver: [`Laboratories`](src/solvers/laboratories.rs)
Going row by row, for each column in the input data we count the number of different beam paths that reach that column in that row. When a beam is split, the count for that column is added to both columns the beam is split into. For part 1 we count the splits, and for parts 2 we sum the count for all columns of the final row.
### Day 8: Playground
:mag_right: Puzzle: <https://adventofcode.com/2025/day/8>, :white_check_mark: Solver: [`Playground`](src/solvers/playground.rs)