Skip to content

Commit 8e34090

Browse files
committed
chore: add note on connection bug
1 parent 70ba7f2 commit 8e34090

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

go/2025/puzzles/day08/main.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ func part1(name string, count int) int {
2626

2727
dsu := dsu.New(len(coords))
2828

29-
// Create X unions in the DSU
29+
// Create X unions in the DSU. I had a bug here for the longest time.
30+
// I was incrementing "connected" when a union was _successful_, which
31+
// made more checks that required.
3032
for i := range count {
3133
dsu.Union(edges[i].P1, edges[i].P2)
3234
}

0 commit comments

Comments
 (0)