Why [2, -1, 1, -2, -2] return false?
I have the same confusion, your loop would be 0->1->3->2->0.
try [1,2,3,4,5], it returns true. if so, [2,-1,1,-2,-2] should also returns true.
because "loop is either forward or backward direction", aka, single direction.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.