Anki Deck Changes

Commit: 730f127e - add dfs pseudocode reminder

Author: obrhubr <obrhubr@gmail.com>

Date: 2026-01-13T11:52:14+01:00

Changes: 1 note(s) changed (1 added, 0 modified, 0 deleted)

Note 1: ETH::A&D

Deck: ETH::A&D
Note Type: Horvath Cloze
GUID: nmO79UYMKA
added

Previous

Note did not exist

New Note

Front

ETH::1._Semester::A&D::09._Graph_Search::1._Depth_First_Search
DFS Pseudocode needs to include a for loop over all unmarked nodes in a graph we're not sure is connected.

Back

ETH::1._Semester::A&D::09._Graph_Search::1._Depth_First_Search
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>
Tags: ETH::1._Semester::A&D::09._Graph_Search::1._Depth_First_Search
↑ Top