File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/main/kotlin/me/peckb/aoc/_2025/calendar/day11 Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -7,13 +7,13 @@ class Day11 @Inject constructor(
77 private val generatorFactory : InputGeneratorFactory ,
88) {
99 fun partOne (filename : String ) = generatorFactory.forFile(filename).readAs(::server) { input ->
10- val serverMap = input.plus(Server (" out" )).map { it.id to it }.toMap()
10+ val serverMap = input.plus(Server (" out" )).associateBy { it.id }
1111
1212 countAllPaths(serverMap, serverMap[" you" ]!! )
1313 }
1414
1515 fun partTwo (filename : String ) = generatorFactory.forFile(filename).readAs(::server) { input ->
16- val serverMap = input.plus(Server (" out" )).map { it.id to it }.toMap()
16+ val serverMap = input.plus(Server (" out" )).associateBy { it.id }
1717
1818 countAllPaths(
1919 serverMap = serverMap,
You can’t perform that action at this time.
0 commit comments