Module aoc::y23d08

source ·
Expand description

Advent of Code 2023 Day 8: https://adventofcode.com/2023/day/8

Today’s challenge part one was fairly easy. Part two was not that much more difficult to extend but the long cycles meant that the brute-force answer would take too long to compute. Instead, knowing that there are cycles (because of the way that the Advent of Code inputs are crafted, this wouldn’t necessarily work on an arbitrary input) we can instead just compute the length of each cycle and then least-common-multiple them all together to get the total number of steps (this is the point where all of the cycles have synced-up and are all on a room ending in “Z”).

Functions§

  • The solution for the day eight challenge.