Programming, Language: Rust

Recent posts (Page 1 of 13)

AoC 2025 Day 12: Knapsackinator

Source: Day 12: Christmas Tree Farm

Full solution for today (spoilers!).

Part 1

Solve the knapsack problem.

But really, you are given a set of tiles (which all happen to be some subset of a 3x3) and a set of constraints–a MxN grid and how many of each tile to place. Count how many constraints are possible.

Tiles may be rotated and/or flipped.

read more...

AoC 2025 Day 10: Linear Algebranator

Source: Day 10: Factory

Full solution for today (spoilers!).

Part 1

Given a target light pattern [.##.] and a series of buttons ((3) (1, 3) etc) where the first button toggles light ‘3’ (the 4th light) and the second toggles the first and 4th etc, what is the minimum number of buttons you need to press to match the light pattern.

read more...

AoC 2025 Day 7: Laser Splittinator

Source: Day 7: Laboratories

Full solution for today (spoilers!).

Part 1

You are given a map like this:

.......S.......
...............
.......^.......
...............
......^.^......
...............

A laser shines from the top S and splits each time it hits a ^, making this:

.......S.......
.......|.......
......|^|......
......|.|......
.....|^|^|.....
.....|.|.|.....

The two lasers in the center of this example merge to count as one laser.

Count how many times lasers hit splitters.

read more...


All posts