Can someone help in printing cycle in a graph

Правка en1, от aman_naughty, 2019-03-24 21:52:50

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 ?

Теги #dfs, #cycle, #graph theory, #beginner

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский aman_naughty 2019-03-24 21:52:50 968 Initial revision (published)