Advent of Code 2019 - Day 24

Note: This topic is to talk about Day 24 of the Advent of Code 2019.

There is a private leaderboard for elixirforum members. You can join it by following this linkand entering the following code:

39276-eeb74f9a

1 Like

A fun one and much easier parsing than the donut maze on Pluto. It still took me a while to find and fix all the bugs for the edge and corner cases (pun intended).

Here is my solution.

1 Like

I thought this was a pretty creative problem, and conceptually simple to grasp. A good one for the end.

For part 2 I was a bit lazy and just hard coded the interesting neighbors with pattern matching. It was a bit of a pain when I pasted without updating, and then had to figure out why it was giving me the wrong answers.

1 Like

I really disliked this problem (well, part 2 of it), to the point that I decided not to deal with it yesterday. I found it quite finicky, and otherwise not really challenging. My solution is here. The only semi-interesting thing is the part where I resolve inner/outer adjacent tiles at compile time. I’m not particularly happy with the code in general, nor with the running time (it takes about 2 seconds for the second part), but I don’t feel like improving it.

1 Like