NetworkX

Previous topic

networkx.astar_path_length

Next topic

networkx.dfs_postorder

networkx.dfs_preorder

dfs_preorder(G, source=None, reverse_graph=False)

Return list of nodes connected to source in depth-first-search preorder.

Traverse the graph G with depth-first-search from source. Non-recursive algorithm.