/images/avatar_square.jpg

Advent of Code 2025 - Day 10: Factory

Day 10 was a mathematical disguise wrapped in a factory automation problem. What looked like pathfinding turned out to be linear algebra - specifically, systems of equations that need Gaussian elimination to solve efficiently. At least, that’s what I thought until Part 2 humbled me. The Problem Factory machines have indicator lights and buttons. Each button toggles specific lights. Find the minimum button presses to configure all machines. Example input: [.

Advent of Code 2025 - Day 9: Movie Theater

Day 9 was about finding the largest rectangle between red tiles on a theater floor. Part 1 was straightforward geometry. Part 2 required checking if rectangles fit inside a polygon - which is where I reached for an external library. Part 1: Largest Rectangle Between Any Two Points Given coordinates of red tiles, find the largest rectangle using any two red tiles as opposite corners. This is pure geometry: for every pair of points, calculate the rectangle area and track the maximum.

Advent of Code 2025 - Day 8: Playground

Day 8 was brutal. Not because the algorithm is complex - but because I kept making implementation mistakes that cost hours of debugging. The Problem Given 3D coordinates of junction boxes, connect them with light strings. Connect the closest pairs first, forming circuits. After making a certain number of connections, find the sizes of the three largest circuits. This is essentially asking: perform a greedy connection strategy (always connect the two closest unconnected boxes) and track which connected components (circuits) form.

Advent of Code 2025 - Day 7: Laboratories

Day 7 was about tachyon beams splitting through a manifold. Part 1 was a straightforward recursive beam tracer. Part 2 took a completely different approach with a quantum twist. Part 1: Classical Beam Splitting A tachyon beam enters at S and travels downward. When it hits a splitter (^), it stops and creates two new beams going down-left and down-right. Example: 1 2 3 4 5 .......S....... .......|....... ......|^|...... ......|.|...... .

Advent of Code 2025 - Day 6: Trash Compactor

Day 6 was a breath of fresh air after the complexity of Days 3-5. The problem involved parsing a math worksheet where problems are arranged vertically in columns. Both parts were straightforward grid manipulation. Part 1: Vertical Math Problems The worksheet has numbers stacked vertically with operators at the bottom. Each column is a separate problem, and we need to sum all the answers. Example: 1 2 3 4 123 328 51 64 45 64 387 23 6 98 215 314 * + * + This represents four problems:

Advent of Code 2025 - Day 5: Cafeteria

Day 5 was about checking ingredient freshness using ID ranges. Part 1 was straightforward with a range check. Part 2 required merging overlapping ranges - something I knew how to do conceptually but struggled to implement correctly. Part 1: Check Individual IDs Given a list of fresh ingredient ID ranges and a list of ingredient IDs to check, count how many IDs fall within any range. The Brute Force Trap My first instinct was to build a complete set of all fresh IDs: