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?