Advent of Code 2024 is a strong year in this repository, with 22 of 25 days fully solved (Days 17, 21, and 24 are still outstanding). The event features competitive leaderboard finishes — including a top-750 finish on Day 13 and top-600 on Day 8 Part 2 — and solutions that draw on a rich algorithmic toolkit: BFS with directional state, linear algebra for constraint solving, sliding-window sequence matching, and more. All solved days include pytest-verified example inputs.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/cj81499/advent-of-code/llms.txt
Use this file to discover all available pages before exploring further.
Puzzle inputs are personal and are not included in the repository. To run
solutions against your own input, use
aocd after setting your
session cookie. See the Solution Structure page for
full setup instructions.Progress Table
| Day | Title | Part 1 | Part 2 | Tests |
|---|---|---|---|---|
| 01 | Historian Hysteria | ⭐ | ⭐ | ✅ |
| 02 | Red-Nosed Reports | ⭐ | ⭐ | ✅ |
| 03 | Mull It Over | ⭐ | ⭐ | ✅ |
| 04 | Ceres Search | ⭐ | ⭐ | ✅ |
| 05 | Print Queue | ⭐ | ⭐ | ✅ |
| 06 | Guard Gallivant | ⭐ | ⭐ | ✅ |
| 07 | Bridge Repair | ⭐ | ⭐ | ✅ |
| 08 | Resonant Collinearity | ⭐ | ⭐ | ✅ |
| 09 | Disk Fragmenter | ⭐ | ⭐ | ✅ |
| 10 | Hoof It | ⭐ | ⭐ | ✅ |
| 11 | Plutonian Pebbles | ⭐ | ⭐ | ✅ |
| 12 | Garden Groups | ⭐ | ⭐ | ✅ |
| 13 | Claw Contraption | ⭐ | ⭐ | ✅ |
| 14 | Restroom Redoubt | ⭐ | ⭐ | ✅ |
| 15 | Warehouse Woes | ⭐ | ⭐ | ✅ |
| 16 | Reindeer Maze | ⭐ | ⭐ | ✅ |
| 17 | Chronospatial Computer | ❓ | ❓ | ❓ |
| 18 | RAM Run | ⭐ | ⭐ | ✅ |
| 19 | Linen Layout | ⭐ | ⭐ | ✅ |
| 20 | Race Condition | ⭐ | ⭐ | ✅ |
| 21 | Keypad Conundrum | ❓ | ❓ | ❓ |
| 22 | Monkey Market | ⭐ | ⭐ | ✅ |
| 23 | LAN Party | ⭐ | ⭐ | ✅ |
| 24 | Crossed Wires | ❓ | ❓ | ❓ |
| 25 | Code Chronicle | ⭐ | ❓ | ✅ |
Personal Leaderboard
Times are relative to puzzle unlock (midnight EST). TheRank and Score columns come directly from the AoC personal leaderboard.
Notable Solutions
Day 13 — Claw Contraption
The Claw Contraption puzzle asks how many tokens are needed to align a claw machine to a prize by pressing two buttons (A and B), each moving the claw by fixed(x, y) offsets, with A costing 3 tokens and B costing 1.
This is a system of two linear equations with two unknowns (button-press counts a and b):
a and b are non-integers, there is no valid solution for that machine. Part 2 shifts the prize coordinate by 10_000_000_000_000, making a brute-force approach completely infeasible and confirming that the analytical approach is the right one.
cheapest_way_to_win) as a point of comparison — though it is marked # pragma: no cover in production use.
Day 16 — Reindeer Maze
The Reindeer Maze is a shortest-path problem with a twist: turning costs 1000 tokens, while a single forward step costs 1. The solution models the state as(position, facing) using complex numbers for the grid and a Facing enum for direction.
Part 1 runs a BFS with cost tracking (analogous to Dijkstra’s algorithm), propagating (cost, state) pairs and keeping the cheapest known cost per state. Turning is detected by comparing the new facing to the old one and adding 1000 to the cost if they differ.
Day 22 — Monkey Market
Monkey Market involves a pseudorandom secret generator: each step XORs and masks the current secret three times to produce the next value. Part 1 simply applies 2000 iterations of the generator for each buyer and sums the results. Part 2 is more complex: each buyer sells bananas when they see a specific 4-step price-change sequence for the first time. The goal is to find the sequence that maximises the total bananas purchased across all buyers. The solution usesitertools.islice and more_itertools.sliding_window to extract every 5-element window from the first 2000 secrets, converts them to price deltas, and builds a lookup table with dict.setdefault to record only the first sale price per buyer per sequence. The winning sequence is found by summing over all buyers.