day(01): remove function body
Signed-off-by: Matej Focko <mfocko@redhat.com>
This commit is contained in:
parent
2c3be983dd
commit
4186cf4815
1 changed files with 2 additions and 7 deletions
|
@ -3,13 +3,8 @@ package day01
|
|||
import readInputAsInts
|
||||
|
||||
fun main() {
|
||||
fun part1(input: List<Int>): Int {
|
||||
return input.windowed(2).count { it[0] < it[1] }
|
||||
}
|
||||
|
||||
fun part2(input: List<Int>): Int {
|
||||
return part1(input.windowed(3).map { it.sum() }.toList())
|
||||
}
|
||||
fun part1(input: List<Int>): Int = input.windowed(2).count { it[0] < it[1] }
|
||||
fun part2(input: List<Int>): Int = part1(input.windowed(3).map { it.sum() }.toList())
|
||||
|
||||
val testInput = readInputAsInts(1, "test_input")
|
||||
val input = readInputAsInts(1, "input")
|
||||
|
|
Loading…
Reference in a new issue