DFS Pseudocode needs to include a for loop over all unmarked nodes in a graph we're not sure is connected.
Note 1: ETH::A&D
Deck: ETH::A&D
Note Type: Horvath Cloze
GUID:
added
Note Type: Horvath Cloze
GUID:
nmO79UYMKA
Previous
Note did not exist
New Note
Front
Back
DFS Pseudocode needs to include a for loop over all unmarked nodes in a graph we're not sure is connected.
Otherwise we aren't visiting ZHKs that aren't connected to our chosen first node.
DFS(g):
all vertices unmarked
for u unmarked:
visit(u)
visit(u):
mark u
for v adjacent to u:
Field-by-field Comparison
| Field | Before | After |
|---|---|---|
| Text | DFS Pseudocode needs to include {{c1:: a for loop over all unmarked nodes}} in a graph we're not sure is connected. | |
| Extra | Otherwise we aren't visiting ZHKs that aren't connected to our chosen first node.<pre><code>DFS(g): all vertices unmarked for u unmarked: visit(u) visit(u): mark u for v adjacent to u: </code></pre><pre><code><br></code></pre> |