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
3737| [ Day 15: Warehouse Woes] ( src/test/kotlin/adventofcode/Day15Test.kt ) | 129 |
3838| [ Day 16: Reindeer Maze] ( src/test/kotlin/adventofcode/Day16Test.kt ) | 261 |
3939| [ 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 |
4141| [ Day 19: Linen Layout] ( src/test/kotlin/adventofcode/Day19Test.kt ) | 60 |
4242| [ 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 {
3535 val end = Point2D (xRange.last, yRange.last)
3636 val fallen = mutableSetOf<Point2D >()
3737 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 } }
3939 return points.first { p ->
4040 fallen.add(p)
41- Graphs .dfs (start, end, neighbors).isEmpty()
41+ Graphs .bfs (start, end, neighbors).isEmpty()
4242 }
4343}
4444
You can’t perform that action at this time.
0 commit comments