public class Solution {

public boolean circularArrayLoop(int[] nums) {

int len = nums.length;

```
if (len == 0)
return false;
for (int i = 0 ; i < len; i++){
int start = i;
int steps = nums[i];
boolean forward = steps>0;
while (true ){
if (nums[start] == 0 )
return false;
nums[start] = 0;
start = (start+steps+len)%len;
if (start == i && forward == steps>0)
return true;
steps = nums[start];
}
}
return false;
}
```

}