Mental Model
We want to find if there is a loop in the graph where you can start at a node and come back to it by following edges without repeating the same edge twice.
Analogy: Imagine walking in a park with paths connecting benches. If you can start at one bench, walk along paths, and return to the same bench without retracing your steps, there is a cycle.
Graph:
1 --- 2
\ /
3
Edges:
1 -> 2
1 -> 3
2 -> 3
This graph has a cycle: 1 -> 2 -> 3 -> 1