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 5ea88db commit febab04Copy full SHA for febab04
src/main/scala/eu/sim642/adventofcode2025/Day8.scala
@@ -46,11 +46,10 @@ object Day8 {
46
.product
47
}
48
49
- // TODO: deduplicate
50
def multiplyLastXs(junctionBoxes: Seq[Pos3]): Int = {
51
val closestPairs = iterateClosestPairs(junctionBoxes)
52
- val lastPair = Kruskal.iterateEdges(junctionBoxes, closestPairs).last
53
- lastPair._1.x * lastPair._2.x
+ val (p1, p2) = Kruskal.iterateEdges(junctionBoxes, closestPairs).last
+ p1.x * p2.x
54
55
56
def parseJunctionBox(s: String): Pos3 = s match {
0 commit comments