Common utilities that I end up using every year for Advent of Code. Includes the Kotlin AoC API for automatically pulling and caching input for each day of the advent.
This can be added to a Kotlin Advent of Code template repository or any other Kotlin JVM project through Jitpack, in your build.gradle.kts
:
dependencies {
implementation("com.github.jsoberg:Kotlin-AoC-Utilities:2024.6")
}
Listing of the current utilities for common functions found in Advent of Code puzzles.
- Grid2D - Simple uniform 2D Grid with utility functions for moving in cardinal directions.
- ReadInput - Uses the Kotlin AoC API to read daily input from API, caching locally in
input/<year>/Day<day>.txt
.
- AsyncSum - Various utility functions for running sum functions asynchronously (using coroutines).