File:Depth-first-tree.svg · Wikimedia Commons · See Wikimedia Commons
derin öncelikli arama
Sign in to saveAlso known as DFS, depth-first traversal, depth first search, depth-first search
algorithm for traversing or searching tree or graph data structures
Key facts
- Class
- Search algorithm
- Data structure
- Graph
- 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 searched to depth d
- 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 elimination of duplicate nodes
- Optimal
- no (does not generally find shortest paths)
via Wikipedia infobox
Described at

Depth first search - Wikimedia Commons
commons.wikimedia.org →Link to a page describing this subject · 937 chars · not written by Vinony
Wikidata facts
- Subclass of
- graph traversal
- Image
- Depth-first-tree.svg
Show 7 more facts
- Commons category
- Depth-first search
- uses
- LIFO
- short name
- DFS
- maintained by WikiProject
- WikiProject Mathematics
- used by
- intelligent agent
- Commons gallery
- Depth first search
- described at URL
- commons.wikimedia.org/wiki/Depth_first_search
Sources (2)
via Wikidata · CC0