Finding a cycle in an undirected graph
- by Evilsithgirl
I need write an algortihm to find a cycle in an undirected graph using O(|V|) time independent of O(|E|). So a running time of O(|V| + |E|) won't be accepted. how can i do this? Will Depth-first search work?