Expand description

Identify a cycle in an infinite sequence.

Functions

Identify a cycle in an infinite sequence using Brent’s algorithm. Return the cycle size, the first element, and the index of first element.
Identify a cycle in an infinite sequence using Floyd’s algorithm. Return the cycle size, the first element, and the index of first element.