2024 Day 6: Guard Gallivant

Another idea is to count the visits of each cell. After 4 you know that you went at least twice from the same direction into a certain cell.

1 Like