Problem 1496 · Easy

Path Crossing

Decide whether a walk on a grid returns to a point it has already visited. The visual traces the path and flags the first revisit.

Open the interactive visualisation