DSA Key Problems

Cycle in an Undirected Graph

Given an undirected graph, determine whether any connected component contains a cycle.