Graph algorithm improvements.
Graph topological ordering algorithm.