topological Sort
Builds an order of nodes so that the first nodes has no outgoing edges, then nodes with edges pointing to these and so on, assuming the graph is a Directed Acyclic Graph (DAG). This is done by running a DFS from each node and ordering the nodes by descending depth (post-order).
Return
A list of nodes in topological order if the graph was a DAG. Otherwise, returns a list of nodes in undefined order