Pseudocode[edit]Input: A graph G and a vertex v of G
Output: All vertices reachable from v labeled as discovered
A recursive implementation of
DFS:[5]1 procedure DFS(G,v):
2 label v as discovered
3 for all edges from v to w in G....
See more
Download the Study24x7 App, so you can connect and collaborate.