Search
⌘K

Leetcode 457. Circular Array Loop

Given a circular array of nonzero integers where each value indicates how many steps to jump forward or backward, determine whether there exists a cycle of length >1 formed by repeated jumps such that every element in the cycle moves in the same direction (all positive or all negative). The classic follow-up asks for an O(n) time and O(1) extra space solution.

Asked at:

O

Oscilar


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Late December, 2025

O

Oscilar

Senior

Comments

Your account is free and you can post anonymously if you choose.