Depth First Search Algorithm
Recursive marking algorithm
Initially every vertex is unmarked
DFS(i: vertex)
mark i;
for each j adjacent to i do
if j is unmarked then DFS(j)
end{DFS}
Previous slide
Next slide
Back to first slide
View graphic version