Note: This topic is to talk about Day 17 of the Advent of Code.
For general discussion about the Advent of Code 2018 and links to topics of the other days, see this topic.
Note: This topic is to talk about Day 17 of the Advent of Code.
For general discussion about the Advent of Code 2018 and links to topics of the other days, see this topic.
Today was quite tricky. In the end I solved it by using a depth-first recursive approach. It works reasonably fast (under a second). The code is available here.
Here is my solution. It runs in about 30 seconds.
Here’s my solution:
It’s very fast, but I admit that I had to download @sasajuric’s code to figure out how to fix a particularly nasty bug I introduced.