[-2, 1, -1, -2, -2]
1->2->1->2->1->2.... there is a 2 element loop
The loop must be "forward" or "backward'.
The loop here, [1, -1], is a forward-backward loop thus not valid.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.