Discussion thread for day 15 of the Advent of Code - https://adventofcode.com/2023/day/15
Like others said, this was definitely one where reading the question took the longest. Otherwise, this was a nice quick one...the calm before the storm?
P1 was straightforward, P2 in spoiler
Finally caught up on Day 15! Took me way too long to troubleshoot but was good to stick at this and finally get it done.
Part 1 was so easy, but my data contained some edge cases that messed with my first approaches.
I had created a macro for the HASH process, but it became too difficult to debug when it came to part 2, so abandoned that approach. Hints to my success in the spoiler.
Solved! I spent longer than I'm going to admit tracking down a mistake I made. Instead of doing a proper RegEx parse (or other RegEx function) for the lens type + power (e.g. abc=2), when I was determining if a label was already present in the box, I just used the Left function with a value of 2, which worked beautifully with the sample data.. and it does not work beautifully with the real data, since I was saying that tcp = tccm and then replacing it.
Once I understood the problem, I was able to solve it neatly.