We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 823a595 + 97bb52e commit 28017c3Copy full SHA for 28017c3
src/main/kotlin/day10/day10.kt
@@ -16,9 +16,6 @@ private fun parse(input: String): List<List<Int>> =
16
.map { line -> line.trim().toList().map { it.digitToIntOrNull() ?: -1 } }
17
18
private fun findTrails(grid: List<List<Int>>): Map<IntPos2D, Trails> {
19
- val rows = grid.size
20
- val cols = grid[0].size
21
-
22
val zeros = grid.flatMapIndexed { rowIdx, row ->
23
row.mapIndexedNotNull { colIdx, height ->
24
if (height == 0) IntPos2D(rowIdx, colIdx) else null
0 commit comments