P465: Enumerate all directed cycles in a directed graph.

P465: Enumerate all directed cycles in a directed graph.
Input:
A directed graph $G = (V, E)$.
Output:
All directed cycles in $G$.
Complexity:
$O(|V| + |E|(C+1))$ time per solution with $O(|V| + |E|)$ space, where $C$ is the number of solutions.
Comment:
Reference:
[Szwarcfiter1976] (Bibtex)