Mental Model
We want to find if there is a loop in a directed graph by tracking nodes we are currently visiting and nodes we have fully checked.
Analogy: Imagine walking through a maze where some paths lead back to where you started. If you step on a tile you are already standing on in this walk, you found a loop.
Graph: 0 -> 1 -> 2 ↑ ↓ └─────────3 Here, node 3 points back to 0, forming a cycle.
