Discussion thread for day 15 of the Advent of Code - https://adventofcode.com/2024/day/15
Solved!
I was able to get a working solution for Part 1, but it took ~3 hours to run. While it was running, I looked through the posts here and saw @gawa's RegEx witchcraft and redid my Part 1 macro with his technique. I initially tried to just do one Generate Rows regardless of the direction, which worked, but then in the next step, I ended up with double the tools, compared to Gawa. I did the 2nd Generate Rows which then made everything else downstream much simpler.
For Part 2, I initially tried to do it by naming the boxes 1 and 2 instead of [ and ], to try to still be able to use some of Gawa's fancy RegEx - it worked for the small example but not for the larger example. I also tried to just have a value for the left side of the box and blank for the right side, but that turned into a mess. Eventually, I went back to a version of what I did for my 3 hour part 1, with a lot of support from Gawa's part 2 when I kept getting stuck (THANK YOU!) and finally got something that works. It takes 3.5 hours to run, but, hey, I'm calling it a victory :)
I also misread part 2 and thought it was saying the GPS was from where ever the nearest corner of the building was, vs the newest corner of the box but always from the top left. So I initially added in more logic than needed and was very confused
Part 1 completed. This was a very different challenge than I've done before (and this is my most successful year to date as far as feeling good with my solutions.
Haven't tackled part 2 yet.