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