Rewrite TopoSort to use DFS version of algorithm. Implement TopoSort in terms of Graph. Add argument to TopoSort to enable deterministic execution.