bfs, dfs to do topological sort and shortest_path