Concept Flow - Cycle Detection in Directed Graph
Start at each unvisited node
Mark node as visited and in recursion stack
For each neighbor
If neighbor not visited
Recurse on neighbor
Remove node from recursion stack
Continue
No cycle found
Start DFS from each node, track visited and recursion stack to find back edges indicating cycles.
