OSDN Git Service
(root)
/
oi-wiki
/
main.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ed09873
)
Update dfs.md
author
心旷神怡
<greyqz@126.com>
Tue, 2 Oct 2018 07:07:03 +0000
(15:07 +0800)
committer
GitHub
<noreply@github.com>
Tue, 2 Oct 2018 07:07:03 +0000
(15:07 +0800)
docs/search/dfs.md
patch
|
blob
|
history
diff --git
a/docs/search/dfs.md
b/docs/search/dfs.md
index
27a6c14
..
26621e2
100644
(file)
--- a/
docs/search/dfs.md
+++ b/
docs/search/dfs.md
@@
-1,4
+1,4
@@
-
dfs
全称是 [Depth First Search](https://en.wikipedia.org/wiki/Depth-first_search)。
+
DFS
全称是 [Depth First Search](https://en.wikipedia.org/wiki/Depth-first_search)。
是一种图的遍历算法。
@@
-34,8
+34,10
@@
void dfs(int u) {
}
```
-时间复杂度 $O(n + m)$
+时间复杂度 $O(n + m)$
。
-空间复杂度 $O(n)$ (vis 数组和递归栈)
+空间复杂度 $O(n)$
。
(vis 数组和递归栈)
-## [在树 / 图上 dfs](/graph/traverse)
+## 在树 / 图上 dfs
+
+主条目:[在树 / 图上 dfs](/graph/traverse)