This is a thread to discuss Day 10
It is VERY important NOT to write any public spoilers
ALWAYS keep spoiler stuff hidden inside one of these
This text will be hidden
which you can obtain by clicking on the gear icon
FYI one of the features of Advent of Code is that we all get given different inputs so our answers will be different.
The examples are all the same but each of us gets different inputs for us to solve
Phew - eventually got a working version (very industrial ) for Part 1
I might need a bit of a rest before attempting Part 2
I've not managed to come up with a method to do this so going to pass on it
I finally got around to doing this (which I really wanted to because it could involve drawing).
And of course here's my path in a visual form.
My idea for this one was to define the list of possible pipe pieces (characters) with their directions, then have some code to find the path. The real tough part was getting it to actually work. Once I got it to work, I added the visual representation because I had been planning on adding it. I feel like the drawing alse gives me an excuse for it to run slowly (it is cool to watch it draw the path).
I love the challenges that are structured to allow you to add some visual flare with drawing the solution, instead of just relying on numbers. For example, 2022 day 9 could be drawn, but 2022 day 10 had you actually create an image, which you had to manually type in the solution shown in the image (it had you draw a crt screen).
For part 2, I'm actually thinking of using a flood fill algorithm to find the area of the path. I may even be able to have it run synchronously with recursion to make it run faster.