Source: Day 3: Foggy Forest
Full solution for today (spoilers!).
Part 1
Given a grid of empty (
.) and full (#) count how many squares have all four points at a#.
Full solution for today (spoilers!).
Given a grid of empty (
.) and full (#) count how many squares have all four points at a#.
Full solution for today (spoilers!).
Given an infinite cycle of ‘roygbv’ and a program of points to visit, advance to each point in turn. Count the total distance.
Full solution for today (spoilers!).
Given a list of integers, calculate the product of the most common three values.
It’s back! (Advent of Code)!
And you know what? Just about everything (at least in the parts of the industry that I see) may be using AI for everything and not writing code anymore… but I like to write code. It’s a fun puzzle. And this is a great chance to do so. Onwards!
I’ll be posting to github as always: jpverkamp/advent-of-code
Part 3! Wherein we learn about rockets, recursion, and ricocheting items (oh my). And make it to … the end?
Here are all of the commits from part 1 up through part 3.
And here are all of the parts in this series so far:
And here we have Part 2! It’s not been that long for you, but since the first part took six months for me to actually get around to writing it… well, this is much better!
Things get a bit more complicated this time, with buttons that can open/close doors and even holes in the floor and BOMBS. But what’s really crazy is how we actually get around to solving how to get to new sublevels this time… and how to take penguins back out of them. Things are getting complicated!
Here are all of the commits from part 1 up through part 2.
And here are all of the parts in this series so far:
Months ago now1, I started playing Gentoo Rescue (after seeing the Aliensrock video). At the core, it’s a Sokoban style puzzle game where you have to guide cute little sliding penguins to their color coded nests… but oh man does it start getting more complicated quickly.
On top of that, it has a really interesting nesting level concept–the level select screens are levels themselves. You can go several ’levels’ deep into levels or eventually further back out. And that’s just with how far I’ve gotten so far…
Full solution for today (spoilers!).
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.
Full solution for today (spoilers!).
Given a directed graph defined where
aaa: you hhhmeansaaais connected toyouandhhh, how many paths are there fromyoutoout.
Full solution for today (spoilers!).
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.