Why cycle detection algorithm defers in directed or undirected graphs?

Revision en1, by old._.monk, 2021-06-03 10:26:54

I'm not able to grasp why the algorithms for cycle detection differ when graphs are directed or undirected.

I found the two algorithms here cp algorithms link

Found an explanation on stackoverflow, but it's still unclear.

Is there any counter-example?

Tags #graph

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English old._.monk 2021-06-03 12:08:56 8
en1 English old._.monk 2021-06-03 10:26:54 506 Initial revision (published)