We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fa8ab49 commit 5278adcCopy full SHA for 5278adc
2024/Day18/Solution.cs
@@ -16,7 +16,7 @@ public object PartTwo(string input) {
16
// we can use a binary search for this
17
18
var blocks = GetBlocks(input);
19
- var (lo, hi) = (0, blocks.Length - 1);
+ var (lo, hi) = (0, blocks.Length);
20
while (hi - lo > 1) {
21
var m = (lo + hi) / 2;
22
if (Distance(blocks, m) == null) {
0 commit comments