Advent of Code 2025 - Day 8: Playground
Day 8 was brutal. Not because the algorithm is complex - but because I kept making implementation mistakes that cost hours of debugging.
The Problem
Given 3D coordinates of junction boxes, connect them with light strings. Connect the closest pairs first, forming circuits. After making a certain number of connections, find the sizes of the three largest circuits.
This is essentially asking: perform a greedy connection strategy (always connect the two closest unconnected boxes) and track which connected components (circuits) form.