My second advent of code! Wherein I hope to actually finish every challenge.
My goal is to use this year as an opportunity to become more familiar with parts of lua that I have formerly neglected, including file i/o and the string library. Another fun part of this year is getting the chance to implement various data structures in Lua for the first time.
5. If You Give A Seed A Fertilizer - I got to write a fun recursive solution
6. Wait For It - Getting to find a clean mathematical calculation was a fun addition to just parsing and counting data.
7. Camel Cards - Lots of fun logic.
9. Mirage Maintenance - Cool concept with a fun recursive solution.
17. Clumsy Crucible - Honestly quite painful, but finding and optimizing a solution felt really good. Implementing a heap was fun too.
19. Aplenty - Parts one and two were both fun in different ways. Utilizing pattern matching to parse expressions, using anonymous functions, and getting to write recursive code.
22. Sand Slabs - I was initially quite intimidated by this one but it ended up being a really fun problem and a nice breather from the pain of the past two days.
24. Never Tell Me The Odds - A fun linear algebra problem for part 1, and I felt that part two had a really creative way to simplify search space and find a solution. Also a case of using what you know about input to make time-saving assumptions.
25. Snowverload - This problem became surprisingly fun, and I enjoyed learning about Kargel's algorithm a lot, as I had no prior knowledge of random algorithms (other than Bogosort).
Welp, it's finally over. I'm super happy that I was able to get to the end this year, as well as pleased that I did it with minimal help from Reddit/Google until the final few days. As desired I learned a lot about string and table methods in Lua, and got to apply and build comfort with concepts from my freshly finished Data Structures class.
Towards the back half of the calendar the tasks also become really interesting exercises in optimization, where you have to use facts about the input you're given to simplify computations and thus reduce runtime. Although admittedly these sometimes felt cheap and unfair, it also exposed me to a more puzzle-like aspect of these programming problems, where sometimes you don't need a complete general solution.