This commit is contained in:
Oleksii Trekhleb
2018-04-11 09:55:21 +03:00
parent 7656cfd6ea
commit 62d9747495

View File

@ -5,3 +5,12 @@ searching tree or graph data structures. One starts at
the root (selecting some arbitrary node as the root in the root (selecting some arbitrary node as the root in
the case of a graph) and explores as far as possible the case of a graph) and explores as far as possible
along each branch before backtracking. along each branch before backtracking.
## Complexity
* Time: O(|V| + |E|)
* Space: O(|V|)
## References
[Wikipedia](https://en.wikipedia.org/wiki/Depth-first_search)