Concept Flow - Cycle Detection in Undirected Graph
Start at any node
Mark node as visited
For each neighbor
If neighbor not visited
Recurse DFS
Cycle found
Return result
Start DFS from any node, mark nodes visited, check neighbors. If a visited neighbor is not the parent, cycle exists.