Research any topic before you write.

Find related topics. | Discover entities. | See connections. | Build a topical map.

Depth-first search

In computer science, depth-first search (DFS) is an algorithm for traversing or searching tree or graph data structures. The algorithm starts at the root node (selecting some arbitrary node as the root node in the case of a graph) and explores as far as possible along each branch before backtracking. Extra memory, usually a stack, is needed to keep track…

Applications, Art & Science

Use the mouse wheel or two fingers (on touchscreens) to zoom in and out of the map.

Research this topic

Explore the main themes, entities and connections around Depth-first search. Start with the topic map, then use the sections below for research and deeper semantic analysis.

Explore this topic

Start with a few of the strongest sections from the source topic. These are research directions, not a list of keywords you must use.

Key facts & relationships

High-confidence facts extracted from structured source data. Use them as anchors for further research.

Class
Search algorithm
Complete
yes (unless infinite paths are possible)
Data structure
Graph
Optimal
no (does not generally find shortest paths)
Worst-case performance
O ( | V | + | E | ) {\displaystyle O(|V|+|E|)} for explicit graphs traversed without repetition, O ( b d ) {\displaystyle O(b^{d})} for implicit graphs with branching factor b s…
Worst-case space complexity
O ( | V | ) {\displaystyle O(|V|)} if entire graph is traversed without repetition, O(longest path length searched) = O ( b d ) {\displaystyle O(bd)} for implicit graphs without…

Topics to explore

Browse the full topic structure. Each item opens a new analysis centered on that subject.

Overview

Properties

Example

Output of a depth-first search

Pseudocode

Applications

Complexity

Advanced semantic analysis

Deeper signals for content research, entity SEO and topical coverage. The plain-language headings explain what each technical view is useful for.

Map overview Semantic statistics

Depth-first search

Nodes58
Edges57
Triples64
Avg. degree1.97
Density0.034483
Components1

How this topic connects Entity context

See the strongest relationship patterns around the current topic before diving into the raw triples.

Depth-first search

Top relations

related to External links · 13
Depth-first search → Boost Graph Library, Breadth First Search, CodeDepth-first, Depth First, Depth-First SearchDepth-First Search Animation, Depth-First-Search, Explanation, First Search Visualization, Java, Open Data Structures, Pat MorinC, Section, YAGSBPL
has application · 11
Depth-first search → Algorithms, Commonwealth, Determining, DFS, Finding, Generating, Maze, Planarity, Solving, Succession, Topological
related to Complexity · 9
Depth-first search → As, DFS, John Reif, More, NC, P-complete, RNC, The, This
related to Properties · 7
Depth-first search → DFS, For, In, The, This, Thus, When
related to Vertex orderings · 5
Depth-first search → It, Polish, Reverse, There, This
see also · 5
Depth-first search → Algorithm, Breadth-first, For, Tree, Two-person
related to Example · 4
Depth-first search → For, Performing, The, Trémaux
related to Output of a depth-first search · 4
Depth-first search → Based, If, Sometimes, The
Class · 1
Depth-first search → Search algorithm
Complete · 1
Depth-first search → yes (unless infinite paths are possible)

Important terminology Word statistics

Use these terms to understand the vocabulary surrounding the topic, not as a checklist for keyword stuffing.

Important terminology

search graph depth-first tree dfs algorithm nodes vertices order edges stack complexity space one visit reverse vertex also possible visited

Entity relationships Subject–Predicate–Object triples

SubjectPredicateObjectConfidenceSrc
Depth-first searchClassSearch algorithm1.00infobox
Depth-first searchCompleteyes (unless infinite paths are possible)1.00infobox
Depth-first searchData structureGraph1.00infobox
Depth-first searchOptimalno (does not generally find shortest paths)1.00infobox
Depth-first searchWorst-case performanceO ( | V | + | E | ) {\displaystyle O(|V|+|E|)} for explicit graphs traversed without repetition, O ( b d ) {\displaystyle O(b^{d})} for implicit graphs with branching factor b s…1.00infobox
Depth-first searchWorst-case space complexityO ( | V | ) {\displaystyle O(|V|)} if entire graph is traversed without repetition, O(longest path length searched) = O ( b d ) {\displaystyle O(bd)} for implicit graphs without…1.00infobox
Depth-first searchhas applicationAlgorithms0.60section
Depth-first searchhas applicationFinding0.60section
Depth-first searchhas applicationTopological0.60section
Depth-first searchhas applicationGenerating0.60section
Depth-first searchhas applicationDetermining0.60section
Depth-first searchhas applicationPlanarity0.60section

Related concept clusters Concept neighborhoods

These clusters group vocabulary that occurs around closely connected concepts in the source material.

    Connections between topic areas Semantic bridges

    Bridges can reveal useful research angles that are easy to miss in a flat list of related terms.

    Min side: 3
    For writers, content strategists, SEOs, marketers and creators — from quick topic research to advanced semantic analysis.