first find tries to find negative loops, second search for positive.

each find is O(n), while traversing the path setting visited nodes to given value.

first use 0 because it cannot be used for anything else, in next pass use -1 because all negative values are gone now.

```
def find(nums, cmp, none):
n = len(nums)
for i in range(n):
s = i
l = 0
while cmp(nums[s]):
hop = (s + nums[s] % n) % n
nums[s] = none
if s == hop:
l = 0
s = hop
l += 1
if l > 1 and nums[s] == none:
return True
return False
class Solution(object):
def circularArrayLoop(self, nums):
return find(nums, lambda x: x < 0, 0) or find(nums, lambda x: x > 0, -1)
```