Pseudocode[edit]Input: A graph G and a vertex v of GOutput: All vertices reachable from v labeled as discoveredA 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.adjacent Edges(v) do 4 if vertex w is not labeled as discovered then 5 recursively call DFS(G,w) - Study24x7
Social learning Network
19 Mar 2019 11:58 AM study24x7 study24x7

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

study24x7
Write a comment
Related Questions
500+   more Questions to answer
Most Related Articles