Mental Model
We visit each node and all its dependencies first, then add the node to the order. This way, nodes come after their prerequisites.
Analogy: Imagine you must finish homework problems in order. You first complete all problems that a problem depends on, then you do that problem last.
Graph: 1 -> 2 -> 3 ā ā 4 5 Topological order means: 4,1,5,2,3 or 4,5,1,2,3 depending on dependencies.
