A friend showed me a leetcode problem yesterday at the Recurse Center:
Which led me to play for a bit on paper, then drafted a rough a visual toy:
https://codepen.io/fractalkitty/live/WbvJKgy
(I haven't actually done any leetcode problems because I often end up on paper and down rabbit holes)