Function cycle_finding

Source
pub fn cycle_finding<T>(init: T, f: impl Fn(T) -> T) -> Rho
where T: Copy + Eq,
Expand description

循環検出法

Space complexity $O(1)$