Recursive DFS

Recursive DFS

DFS(v:Integer)

visit and mark v;

while there is an unmarked vertex w adjacent to v do

DFS(w)

endwhile

end DFS

(Global AdjacencyList is required)

Previous slide Next slide Back to the first slide View Graphic Version