Problem 457 · Medium

Circular Array Loop

Decide whether a circular array contains a cycle of jumps that all move in one direction and include more than one index. The visual follows each jump around the ring, marks visited positions, and rejects single-index loops.

Open the interactive visualisation