diff --git a/src/aoc2023/Day04.kt b/src/aoc2023/Day04.kt index 372a72f..58db81c 100644 --- a/src/aoc2023/Day04.kt +++ b/src/aoc2023/Day04.kt @@ -56,16 +56,6 @@ Card 6: 31 18 13 56 72 | 74 77 10 23 35 67 36 11 }.sumOf { it!! } } - fun rec(winTable: List, pos: Int): Int { - var sum = winTable[pos] - if (sum > 0) { - for (j in pos + 1..(pos + sum).coerceAtMost(winTable.lastIndex)) { - sum += rec(winTable, pos) - } - } - return sum - } - fun part2(input: List): Int { val winTable = input.map { "Card +(\\d+): (.*)".toRegex().matchEntire(it)?.destructured