Cycles in a graph

Правка en5, от tgp07, 2022-05-20 05:49:38

Let's you have a graph with n nodes and m bi-directional edges. (n, m <= 1e5). How would I get the cycles in this graph in an efficient way using DFS.

BTW, I've linked an image where I drew what I thought is a cycle. If it's not a cycle, please tell me what a cycle actually is.

https://imgur.com/a/Qrrg8DF

Теги dfs, cycles

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en5 Английский tgp07 2022-05-20 05:49:38 26 Tiny change: '\nhttps://codeforces.me/5a7fab' -> '\nhttps://imgur.com/a/Qrrg8DF'
en4 Английский tgp07 2022-05-20 02:54:28 3 Tiny change: 'com/5a7fab/\n' -> 'com/5a7fab'
en3 Английский tgp07 2022-05-20 02:54:01 77
en2 Английский tgp07 2022-05-20 02:53:18 69
en1 Английский tgp07 2022-05-20 02:52:48 299 Initial revision (published)