Mental Model
We want to find if there is a loop in the graph where you can start at one 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 walk along the paths and return to the same bench without retracing your steps, there is a cycle.
Graph nodes connected by edges: 1 / \ 2 - 3 Here, 1 connects to 2 and 3, and 2 connects to 3 forming a cycle.
