P5: Enumeration of all cycles in a graph

P5: Enumeration of all cycles in a graph
Input:
A graph $G=(V,E)$.
Output:
All cycles in $G$.
Complexity:
$O(|E| + \sum_{c \in \mathcal{C}(G)}|c|)$ total time.
Comment:
$\mathcal{C}(G)$ is the set of all cycles in $G$.
Reference:
[Ferreira2012] (Bibtex)