- #1

- 1,231

- 0

Give an O(|V|) algorithm that determines whether or not an undirected graph G = (V, E) contains a cycle.

Hint (highlight): if the graph has at least |V| edges you know it's cyclic

If you answer this, why not post your own interesting mathematical CS question! (don't post homework)