diff --git a/src/day01/Day01.kt b/src/day01/Day01.kt index fce4b05..980d48a 100644 --- a/src/day01/Day01.kt +++ b/src/day01/Day01.kt @@ -4,7 +4,7 @@ import readInputAsInts fun main() { fun part1(input: List): Int = input.windowed(2).count { it[0] < it[1] } - fun part2(input: List): Int = part1(input.windowed(3).map { it.sum() }.toList()) + fun part2(input: List): Int = input.windowed(4).count { it[0] < it[3] } val testInput = readInputAsInts(1, "test_input") val input = readInputAsInts(1, "input")