Source: Day 6: Guard Gallivant
Full solution for today (spoilers!).
Part 1
You are given a grid of walls (
#
), floors (.
), and a guard (^
, initially facing up/north). The guard walks forward until they run into a wall at which point they turn right. How many tiles does the guard reach before leaving the map.