Source: Day 8: Haunted Wasteland
Full solution for today (spoilers!)
Part 1
Given a (repeated) sequence of moves (
L
for left andR
for right) and a directed graph where each node has two neighbors (left and right), count how many total steps it takes to get from the nodeAAA
to the nodeZZZ
. The sequence of moves can (and will) need to repeat.