NetworkX

Previous topic

networkx.floyd_warshall

Next topic

networkx.dfs_postorder

Quick search

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.