chiark / gitweb /
20b done
authorBen Harris <bjh21@bjh21.me.uk>
Fri, 31 May 2024 08:13:15 +0000 (09:13 +0100)
committerBen Harris <bjh21@bjh21.me.uk>
Fri, 31 May 2024 08:13:15 +0000 (09:13 +0100)
commit2902a81d6c0152fec9f739280478bd480a1ed618
tree5eadbc0ed78ec34f2b196d2f5a6ef6f0266bfe4f
parent4cd595bc06d4fcecf82776c0046161e85a5b4676
20b done

The problem was that my input included repeated numbers, so I needed to
keep track of which instance of a repeated number I was moving.  I
achieved this by applying the mixing operation to a list of indices into
the original array, looking up shift amounts in the original array and
translating back to the original values at the end.
20/20a.bqn
20/20b.bqn