Depth-first search: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 4: | Line 4: | ||
=== Pseudocode === | === Pseudocode === | ||
--- | |||
==== DFS(''G'') ==== | ==== DFS(''G'') ==== | ||
1 '''for''' each vertex ''u'' ∈ ''V''[''G'']</br> | |||
2 '''do''' color['''u'''] ← WHITE | 2 '''do''' color['''u'''] ← WHITE | ||
3 | 3 |
Revision as of 16:14, 14 August 2014
Definition
Pseudocode
---
DFS(G)
1 for each vertex u ∈ V[G]
2 do color[u] ← WHITE
3
4
5
6