Advent of Code

Annual programming challenge - solutions and notes

Annual programming challenge that runs every December, Advent of Code offers a series of puzzles that test various programming skills. I have participated in multiple years, primarily using Kotlin. This serves as a good exercise in problem-solving and exploring other mechanisms and libraries in Kotlin.

Years

Year Language Days
2015 Kotlin [6/25]
2017 Kotlin [2/25]
2021 Kotlin [3/25]
2022 Kotlin [7/25]
2023 Kotlin [15/25]

Notable Problems

Given the nature of Advent of Code, the problems vary widely in terms of themes and required skills. Some later days were less complex and took less time, while some earlier days were the opposite.

Patterns & Takeaways

Many of the issues that the problems present could be solved with complex Regular Expressions, but I found using recursiveness to be more intuitive and easier to implement. Parsing is done line by line, as to avoid the complexity of multi-line regexes, and the recursive nature of the problems lends itself well to a recursive solution.

Tags

  • kotlin