We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1d9cb46 commit 42504ddCopy full SHA for 42504dd
src/main/scala/eu/sim642/adventofcode2025/Day7.scala
@@ -26,7 +26,7 @@ object Day7 {
26
27
BFS.traverse(graphTraversal)
28
.nodes
29
- .count(pos => grid(pos) == '^')
+ .count(grid(_) == '^')
30
}
31
32
def countTimelines(grid: Grid[Char]): Long = {
@@ -48,7 +48,8 @@ object Day7 {
48
49
50
51
- helper(0, Map(grid.posOf('S').x -> 1))
+ val startPos = grid.posOf('S')
52
+ helper(startPos.y, Map(startPos.x -> 1))
53
54
55
def parseGrid(input: String): Grid[Char] = input.linesIterator.map(_.toVector).toVector
0 commit comments