1
0

Fix readme typos

This commit is contained in:
Stefan Müller
2026-07-09 23:37:03 +02:00
parent 884a287e63
commit 3261bd9989
+3 -3
View File
@@ -54,15 +54,15 @@ We implement two different ways to collect numbers from the input. For part 1, n
:mag_right: Puzzle: <https://adventofcode.com/2025/day/7>, :white_check_mark: Solver: [`Laboratories`](src/solvers/laboratories.rs) :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. 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 part 2, we sum the counts for all columns of the final row.
### Day 8: Playground ### Day 8: Playground
:mag_right: Puzzle: <https://adventofcode.com/2025/day/8>, :white_check_mark: Solver: [`Playground`](src/solvers/playground.rs) :mag_right: Puzzle: <https://adventofcode.com/2025/day/8>, :white_check_mark: Solver: [`Playground`](src/solvers/playground.rs)
For part 1 we track a number of smallest distances between junction boxes up to the specified maximum in a priority queue, always dropping the highest when we find a better one. At the end, we use these to find connected circuits, and count their sizes. For part 1, we track a number of smallest distances between junction boxes up to the specified maximum in a priority queue, always dropping the highest when we find a better one. At the end, we use these to find connected circuits, and count their sizes.
For part 2 we instead construct a spanning tree of all junction boxes, such that the maximum distance between any pair is minimal. Once all junction boxes have been added to this graph, the pair of junction boxes with the longest distance in the spanning tree. For part 2, we instead construct a spanning tree of all junction boxes, such that the maximum distance between any pair is minimal. Once all junction boxes have been added to this graph, the pair of junction boxes with the longest distance in the spanning tree.
When adding any new junction box, we either take connect it via the shortest edge, if it is already longer than the current maximum in the tree. Otherwise, we connect it via the first edge shorter than the current maximum, and for additional edges shorter than the current maximum we find the longest edge on the unique path between the two vertices now already connected, remove it, and add the new shorter one. The current maximum is tracked again in a separate priority queue, and eventually gives the solution. When adding any new junction box, we either take connect it via the shortest edge, if it is already longer than the current maximum in the tree. Otherwise, we connect it via the first edge shorter than the current maximum, and for additional edges shorter than the current maximum we find the longest edge on the unique path between the two vertices now already connected, remove it, and add the new shorter one. The current maximum is tracked again in a separate priority queue, and eventually gives the solution.