AdventOfCode2022 MrCode
Advent of Code 2022 solutions in Kotlin, exploring algorithmic challenges across the December puzzle calendar.

Solutions to Advent of Code 2022's daily puzzles, written in Kotlin — the first of two yearly AoC repos in this portfolio, working through the December puzzle calendar's mix of parsing, simulation, and small algorithmic challenges (pathfinding, cellular automata, interpreter-style puzzles) with straightforward, readable Kotlin rather than optimizing for brevity.
Under the hood
Each day/part is its own tiny Kotlin file under src/main/kotlin — Day 1 part 1 splits the input into elf groups on blank lines and finds the largest calorie total.
src/main/kotlin/day1to10/Day1/part1.kt
Kotlinfun main() {
print(File("src/main/kotlin/Day1/input1.txt.txt").readText().split("\r\n\r\n").map {
it.split("\r\n").map { if (it.isNotEmpty()) it.toInt() else 0 }.sum()
}.max())
}