I want help please don't down-vote.
I want to print the cycle in an undirected graph. I know how to detect cycle in an undirected graph but can't determine how to find the vertices involved in the cycle. Here is the code to find cycle.
code
Can someone please tell me how to modify this so that I can get the vertices in the cycle as well.
I have seen geeksforgeeks article on printing all cycles but I can't understand it. Is there some simpler approach ?