File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
src/main/kotlin/adventofcode/day18 Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,6 @@ Here are the solutions I have implemented along with the time it took to run eac
37
37
| [ Day 15: Warehouse Woes] ( src/test/kotlin/adventofcode/Day15Test.kt ) | 129 |
38
38
| [ Day 16: Reindeer Maze] ( src/test/kotlin/adventofcode/Day16Test.kt ) | 261 |
39
39
| [ Day 17: Chronospatial Computer] ( src/test/kotlin/adventofcode/Day17Test.kt ) | 93 |
40
- | [ Day 18: RAM Run] ( src/test/kotlin/adventofcode/Day18Test.kt ) | 3,328 |
40
+ | [ Day 18: RAM Run] ( src/test/kotlin/adventofcode/Day18Test.kt ) | 2,608 |
41
41
| [ Day 19: Linen Layout] ( src/test/kotlin/adventofcode/Day19Test.kt ) | 60 |
42
42
| [ Day 20: Race Condition] ( src/test/kotlin/adventofcode/Day20Test.kt ) | 0 |
Original file line number Diff line number Diff line change @@ -35,10 +35,10 @@ fun String.findFirstByteThatBlocksExit(): Point2D {
35
35
val end = Point2D (xRange.last, yRange.last)
36
36
val fallen = mutableSetOf<Point2D >()
37
37
val neighbors =
38
- { p: Point2D -> p.neighbors().filter { it.x in xRange && it.y in yRange }.filter { it !in fallen} }
38
+ { p: Point2D -> p.neighbors().filter { it.x in xRange && it.y in yRange }.filter { it !in fallen } }
39
39
return points.first { p ->
40
40
fallen.add(p)
41
- Graphs .dfs (start, end, neighbors).isEmpty()
41
+ Graphs .bfs (start, end, neighbors).isEmpty()
42
42
}
43
43
}
44
44
You can’t perform that action at this time.
0 commit comments