NB: spoilers below
Part 2 was pretty tricky: the sample data left it a big ambiguous about how to handle overlapping words,
eg should the numbers from twone3 be 23, 213, 13 or something else.
Spoiler
My initial guess was wrong - overlapping words are all counted.
Much more straightforward today.
Now I know how to get a rolling window of three items in an array. Thank you itertools
Short and sweet
Nightmare!
Luckily used the maths approach for the first half, which saved effort
Quite fiddly, but also quite fun, so ...
Part 1 was deceptively easy. Part 2 was not going to succumb to brute force, so other options were needed. This was the first one that felt like it needed some exploration and tyre-kicking to get the lay of the land to have a chance of solving.
Like a refreshing palette-cleanser after the heavy meal that was day 8. Did it while the coffee machine was warming up. Part 2 thankfully not a nightmare.
I found the second part realllly hard.
A bit fiddly, but much more tractable than yesterday!
I thought I'd be dropping a star today. The first part wasn't too bad, but I
feared the second bit was like day 8 and would require a different approach
though. Thankfully, a flash of insight (and the use of functools.cache) meant
the day was saved.
Rather fiddly. Thought it would be really quick, ended up a bit longer.
First part - not too bad. Second part ... nightmare.
Palette-cleanser after day 14.
First half rather fiddly, but luckily came up with an approach that just scaled nicely for the second. Phew.
UGLY.
Not quite sure how much I'm actually enjoying this now..!
Beam me up.
Quite fun, honestly, but hadn't expected to be doing network analysis.
First half pretty easy, second half a nightmare entailing basically noticing patterns and realising that there's a quadratic relationship based on a cycle that happens to be a factor of the number of steps being searched for. Looking at the number of "tiles" (ie repeating boards) with different numbers, there was a relationship between that and the iteration number.
Wasted some time at the start, not noticing the z orders at the beginning. Relatively calm once that bit sorted though.