DFS

Hide text Hide pseudo-code

Visit the nodes in DFS order.

Some additional problems.

Algorithm DFS(G)

  1. for each u ∈ V[G] do
  2.      visited[u] ← false
  3.      finished[u] ← false
  4. for each u ∈ V[G] do
  5.      if visited[u] = false
  6.           DFS-VISIT(G, u)


  Created Wed Jun 20 16:00:43 EEST 2007 - Powered by SVG-hut