I didn't use a stack for day 11, I just marked cells that had already flashed that step with a special entry so I could stop it processing a cell more than once per step. That way is was just a relatively simple DFS.
https://gist.github.com/alexgreenbank/7a9123f8bd1aec310d75836f8946596b
Nice, saves a good chunk of memory...
@frankenbike started
London Fixed Gear and Single-Speed is a community of predominantly fixed gear and single-speed cyclists in and around London, UK.
This site is supported almost exclusively by donations. Please consider donating a small amount regularly.
I didn't use a stack for day 11, I just marked cells that had already flashed that step with a special entry so I could stop it processing a cell more than once per step. That way is was just a relatively simple DFS.
https://gist.github.com/alexgreenbank/7a9123f8bd1aec310d75836f8946596b