I really liked this one. Using a circular buffer for the fish counts you can reduce the simulator loop to a single addition. https://github.com/cgresty/adventofcode2021/blob/main/src/main/java/dev/gresty/aoc2021/Day06.java
@bracketed 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 really liked this one. Using a circular buffer for the fish counts you can reduce the simulator loop to a single addition.
https://github.com/cgresty/adventofcode2021/blob/main/src/main/java/dev/gresty/aoc2021/Day06.java