Cycle in an Undirected GraphGiven an undirected graph, determine whether any connected component contains a cycle.