I’ve participated in Advent of Code for several years, but I never made it to the end. This is finally the first year I didn’t drop, mainly because the number of puzzles has greatly reduced.
I also didn’t solve the puzzles day by day as they were released. Some days I didn’t touch them at all, and on other days I’d solved a few puzzles in one go.
Just jotting down a few thoughts on this year’s puzzles (with some spoilers):
- Day 1: Secret Entrance – I had to add an inefficient, naive implementation just so I could see what I did wrong in my main one.
- Day 2: Gift Shop – This was fun. Writing an array permutation iterator was enjoyable, and I’m pretty proud that I only needed to add a bit more code to solve Part 2. Most of my Part 1 code was reused.
- Day 3: Lobby – Why is this easier than Day 2?
- Day 4: Printing Department – I only added a few lines of code on top of Part 1 to complete Part 2. Didn’t even remove a single line.
- Day 5: Cafeteria – Pretty easy.
- Day 6: Trash Compactor – Took a bit longer. Not hard, I just made some silly mistakes.
- Day 7: Laboratories – Part 1: I didn’t handle coincident beams at first, but caught it later and fixed it. Overall still pretty straightforward. Part 2: I knew it. The recursive function kept running forever. Time for memoization.
- Day 8: Playground – Super easy. But silly me, it took a while to realize integer overflow was causing my squared distance function to return wrong values.
- Day 9: Movie Theater – Part 2 was tough. Coordinate compression and ray casting did the trick.
- Day 10: Factory – Linear algebra 101, but I still had a hard time implementing it. This is the hardest one.
- Day 11: Reactor – This felt way too easy for Day 11. It should’ve been Day 3.
- Day 12: Christmas Tree Farm – I’m disappointed that a problem relies on a very specific property of the input, especially when the sample input doesn’t even have that property.
Overall, I had a really good time. Advent of Code has always been a nice little ritual leading me up to Christmas. Hope you had a good time too. Merry Christmas!