This is a template for anyone who wants to solve the Advent of Code challenges in Kotlin. It provides a simple way to run your code and measure the execution time. Additionally, it comes with some nice utility functions to simplify the parsing of the input data.
- Clone this repository
- Copy/paste the input data for each day into the
src/main/resources
directory (Example) - Create a new package/class for every daily puzzle you want to solve in the
src/main/kotlin
directory (Example)- Make sure to extend the
BasicDay
class - You can use the utility functions in FileReader to simplify the parsing of the input data
- Make sure to extend the
- Have fun
The execution time of your code is measured automatically if you implement your solution as BasicDay
(follow the instructions above). The result will be printed to the console after the execution of your code.
This can be especially useful if you want or need to improve the performance of your solution. Some puzzles can be quite challenging in terms of performance. Even if your solution is theoretically correct, the actual execution time may exceed the heath death of the universe.