Cycle Detection
A cycle is a path that leaves a vertex and, by following edges, returns to it. That definition reads
A cycle is a path that leaves a vertex and, by following edges, returns to it. That definition reads
A singly-linked list, or anything shaped like one — a permutation's i -> p[i] mapping, a