← Questions

Fewest jumps between two indices of a circular array

0
UberCodingLast asked Jan 2026

In a circular array, arr[i] is the exact distance you may jump from index i, either left or right, wrapping around the ends. Given a start index and a target index, return the fewest jumps from one to the other, or -1.

Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding