Day 7 of #AdventOfCode still wasn't the expected nigh impossible puzzle, but it allowed for another nice visualisation. :)
Part 2 did require some thinking. As in "Yes, I understand the instructions, but how does that lead to the given result??" Once I had figured that out, it only required a few small adjustments to part1 (and some trial and error).
(More by luck than judgement, the brute force solution didn't even occur to me until I was almost done. It would have been easy enough to implement and would have allowed for another nice visualisation. Instead I got the same visualisation for both parts. 🤷)
One very pleasant aspect of C++ is how easy it is to refactor code. For part 2 I needed to count, so I used a vector of long long (just in case) instead of a string. With a single exception, the only places that needed adjustment were exactly those where the algorithm changed, so I didn't need to keep track of what I needed to update because the compiler did.