I ran in the same question, yet I would say the problem is well worded... and cunning. :)

The forward and backward loops could have been defined explicitly yet the reader can figure out what they mean... once he/she pays attention to them! In the heat of the fight I certainly did not.

In case of the [-1,2] observe that there is no valid loop. 2 maps to itself and 1 maps to 2.

In case of [1,1] we have a valid loop a both "edges" go forward and close a loop of 2 vertices.

Finally, see that [1,-1] does not contain a valid loop as one of the edges goes forward and the other one goes backward.

Hope that helps. Note that If you have solved the problem for finding any loop of at least two vertices, chances are your code can be quickly modified to the right one.