Cognitive Scaffold

Preparing your thinking workspace

arrow_back_ios_new
MENTAL MODEL · M10832

Depth-First Search

Depth-First Search
DecideHigh supportDecision Science
Included
account_tree

Version 1.0.0 · Updated 2026-07-30

CORE DEFINITION

A traversal/search strategy: go all the way down one path until no further progress is possible, then backtrack and try another path. The counterpart is breadth-first search (exploring all adjacent options first).

SCAFFOLDING EFFECT

psychology

Reduce cognitive load

Clarify the choice between "depth-first" and "breadth-first". Each strategy has its applicable scenarios: - Depth-first: when the solution is likely deep, or when a complete path is needed - Breadth-first: when the solution is likely shallow, or when the shortest path is needed

anchor

Anchor fast decisions

DFS: starting from the origin, go as deep as possible along one branch, then backtrack to explore sibling branches upon reaching a leaf; can be implemented with a stack or recursion, space is better than BFS, but does not guarantee finding the shortest path.

MINIMUM ACTION

In progress 0/4

Practice this model in one real situation:

Check to track your progress (stored locally)
Learning progress0%
account_treeGenealogyexpand_more
menu_bookReferencesexpand_more

Source support: Explicit

  • link
    en.wikipedia.orghttps://en.wikipedia.org/wiki/Depth-first_searchZH · Explicit
    verified

RELATED MODELS