Yawn. It was a relief to get something solvable after the problems from Saturday and Monday which were incredibly hard, but another Conway's Game of Life, with another huge iteration count? Just cranking the handle here, nothing new to solve.
I modelled it with a 2D array. Getting more familiar with Kotlin arrays and sequences now.
Yawn. It was a relief to get something solvable after the problems from Saturday and Monday which were incredibly hard, but another Conway's Game of Life, with another huge iteration count? Just cranking the handle here, nothing new to solve.
I modelled it with a 2D array. Getting more familiar with Kotlin arrays and sequences now.
I made an infinite sequence of states again:
So part 1 was trivial:
For part 2 I made a generic loop finder:
Then used this to do the old find-loop-run-last-few-iterations dance: