Nice! It certainly interests me, although thorough analysis will have to
wait till I get back to my PC.
I think Raul's approach is similar, although mine, especially part B, is
more complicated.
NB. Day 14: Extended polymerization
in=: [: freads '.txt' ,~ _2 {.!.'0' ": NB. read input of day y (gi
As I recall, a killer question until one realises there’s no need to preserve
the order; then it’s just a matter of maintaining counts, as you observe.
I’m currently wondering how to acquire the tera- or peta-bytes of storage to
deal with day 22 part 2. Part 1 is easy, of course. No spoilers,
https://adventofcode.com/2021/day/14
For day 14, we were supposed to run a "polymerization sequence" for N
steps, and then find the difference in the quantity between the most
common and least common elements of the sequence.
For part A, we were supposed to run 10 steps. For part B, we were
suppo