Skip to main content

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.

Advent of Code 2018 is a complete year — all 25 days solved, both parts. The year follows the Elves through time-travel mishaps featuring fabric-claim disputes, guard-sleep schedules, marble games, mine-cart collisions, Elf combat, and a register-based virtual machine. Day 1 Part 2 and Day 19 Part 1 both earned global leaderboard scores. Nearly every solution carries a full test suite.

Progress

Notable Solutions

Day 15 — Beverage Bandits

One of the most demanding puzzles of 2018: a full combat simulation between Elves and Goblins on a cave grid. Units take turns in reading order (top-to-bottom, left-to-right), each moving one step toward the nearest reachable enemy (BFS with tie-breaking) and then attacking the adjacent enemy with the lowest hit points. Part 2 binary-searches for the minimum Elf attack power that lets the Elves win without any casualties. The solution uses a MoveNode tree to reconstruct movement paths from BFS.

Day 11 — Chronal Charge

Part 1 finds the 3×3 sub-grid with the highest total power level by brute-force summation. Part 2 asks for the best sub-grid of any size from 1×1 to 300×300. The efficient solution uses a summed-area table (prefix sums) so that any rectangular region’s sum can be computed in O(1), reducing the full search from O(n⁵) to O(n³).

Day 18 — Settlers of The North Pole

A classic cellular automaton on a grid of open ground (.), trees (|), and lumberyards (#). Each cell’s next state depends on its eight neighbours. Part 1 runs 10 minutes. Part 2 runs 1,000,000,000 minutes — solved by detecting the cycle length in the sequence of states and skipping ahead, then running just the remaining steps.
Puzzle inputs are personal and are not stored in this repository. Solutions fetch input at runtime using aocd (aocd.data).

Build docs developers (and LLMs) love