Skip to content

Commit 4293613

Browse files
committed
2025 day10
1 parent bc8864f commit 4293613

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

2025/day10/.bench

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"Lines":[{"Name":"Part 1","N":656,"NsPerOp":1793042,"AllocedBytesPerOp":0,"AllocsPerOp":0,"MBPerS":0,"Measured":1,"Ord":0},{"Name":"Part 2","N":85,"NsPerOp":14468509,"AllocedBytesPerOp":0,"AllocsPerOp":0,"MBPerS":0,"Measured":1,"Ord":0}],"Measured":1}

2025/day10/part2.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ func doPartTwo(input string) int {
4646
targetJoltages = append(targetJoltages, utils.Atoi(c))
4747
}
4848

49-
// Solve for minimum presses to reach joltages
50-
score, possible := minpresses.SolveMinPresses(buttonPositions, targetJoltages)
49+
// Solve for minimum presses using linear solver
50+
score, possible := minpresses.SolveMinPressesLinear(buttonPositions, targetJoltages)
5151
if !possible {
52-
score = 0 // No solution
52+
score = 0
5353
}
5454

5555
results <- result{index: index, score: score, line: line}

0 commit comments

Comments
 (0)