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