Problem 2757 · Medium

Generate Circular Array Values

Build a generator that first yields arr[startIndex], then accepts a signed jump on every later call, moves that far around the array treated as a ring, and yields the value it lands on.

Open the interactive visualisation