Consider this example, I did my pseudocode in python
findCycle(G): for each edge e in E(G): isThereCycle(G-e): G = G - e return G
assume isthereCycle returns true or false if graph $ G$ has a cycle.
Input is a graph $ G$ that contains a cycle and returns a path of that cycle.
We go through each edge then remove it and see if a cycle still consist without that edge, until we are left with a graph with a single path that is a cycle. (Assume removing the edge (G – e) doesn’t mutate the graph unless we do G = G – e).
I want to return a path. Is what I’m returning a path?