Advent of Code 2021


This was the first year I heard about Advent of Code. It sounded like it would be a lot of fun and it absolutely was. I really liked the variety in skillsets and approaches the puzzles demanded. Some days I was graphing quadratic inequalites and others I was implementing Dijkstra's algorithm. An extra source of excitement was that while I was starting the event I was also wrapping up my first ever computer science course, without which I don't think I could have solved all 25 days. Learning about abstract data types and big O in lecture is one thing, but applying them to these puzzles brought a whole new level of understanding and appreciation for the topics. I would read the introduction to the problem and immediately jump to "oh, I should use a stack/tree/heap", which was just a cool feeling. And no amount of reading could instill the consequences of using a quadratic algorithm quite like your solution to part 1 taking years to run on part 2. I also learned some new strategies in the past month, the most helpful of which was definitely memoization.

All in all, I had a great time. Some days I spent a long time carefully finding elegant solutions, and others I kind of threw things at the wall and ran with whatever stuck. Some solutions run in less than a second, some take closer to 15. Maybe in future years I'll spend more time on optimization, but for now I'm just happy to have all fifty stars. Besides, I definitely need a break from spending all day scribbling expression trees or rotations in 3-space. Hopefully after that I can bring the coding fervor Advent of Code whipped up in me to my own projects in the new year. Here's to 2022!

Tags: Programming, Advent of Code