Graph traversal: Difference between revisions

Content deleted Content added
Textdoc (talk | contribs)
mNo edit summary
Tags: Mobile edit Mobile web edit
Line 13:
 
==Graph traversal algorithms==
Note. — If each vertex in a graph is to be traversed by a tree-based algorithm (such as DFS or BFS), then the algorithm must be called at least once for each [[connected component (graph theory)|connected component]] of the graph. This is easily accomplished by iterating through all the vertices of the graph, performing the algorithm on each vertex that is still unvisited when examined.
Mn
 
 
 
 
Mn
Mn asa lunvisited when examined.
 
===Depth-first search===