flâneur — a map of the web's best reading

Depth-first search - Wikipedia

en.wikipedia.org · 3,015 words · saved by 1 readers

Photograph a historic site, help Wikipedia, and win a prize. Participate in the world's largest photography competition this month! Learn more 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 of the nodes discovered so far along a specified branch which helps in backtracking of the graph. A version of depth-first search was investigated in the 19th century by French mathematician Charles Pierre Trémaux[1] as a strategy for solving mazes.[2][3] The time and space analysis of DFS differs according to its application area. In theoretical computer science, DFS is typically used to traverse an entire graph, and takes time 𝑂 ( | 𝑉 | + | 𝐸 | ) ,[4] where | 𝑉 | is the number of vertices and | 𝐸 | the n

Depth-first search - Wikipedia Jump to content From Wikipedia, the free encyclopedia Algorithm to search the nodes of a graph This article needs more citations . Please help improve this article by adding citations to reliable sources . Unsourced material may be challenged and removed . Find sources: "Depth-first search" – news · newspapers · books · scholar · JSTOR ( July 2010 ) ( Learn how and when to remove this message ) O(|V| + |E|)</math> for explicit graphs traversed without repetition, <math>O(b^d)</math> for implicit graphs with branching factor ''b '' searched to depth ''d''"},"space

Explore this link on the map →

related reading