I have an array of tuples; say,
[(1,2), (2,1), (3,4), (4,5), (5,3)]
There are two cycles in the above; one of length 2 and one of length 3. I