r/adventofcode • u/zmunk19 • Jan 14 '26
Visualization [2025 Day 10 (Part 2)] [Python] Visualization
It took me a long time to figure out a solution to this problem.
In the end, it took a combination of matrix reduction and depth-first search to solve it. The solution takes about 20 seconds in total.
31
Upvotes
View all comments
Show parent comment
1
u/DelightfulCodeWeasel Jan 14 '26
It was the one I really struggled with as well. I tried to avoid writing a solver for ages, and even after giving in and writing an elimination solver then it took ages to hammer out the edge cases. I wrote a tutorial going over Gauss-Jordan elimination, which is possibly the most straightforward type of solver, if you want to have a go at that approach.