Day 0
Junction boxes and circuits.
Tips for first problem
Beware of off-by one errors and trying to understand the problem exactly.
Even the first problem today defeated me. I managed to get the code to solve the demo problem, but then got a weird edge case for the big version, which I couldn’t debug even after refactoring the code a couple of times.
Some ideas
- distance matrix… got that to work, but somehow the logic for finding the shortest path didn’t work out.
Second problem
No cigar today. Had issues with Sets and tried keepin an array list of indices of used Junction boxes… but this probably required some better data structures (and maybe a CS degree - haha)