Skip to content

Commit 2bc2eb6

Browse files
committed
DFS
1 parent deac6f0 commit 2bc2eb6

File tree

1 file changed

+13
-0
lines changed
  • src/main/java/com/zhoujian/solutions/dataStructure/graph

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package com.zhoujian.solutions.dataStructure.graph;
2+
3+
/**
4+
* @author zhoujian123@hotmail.com 2018/4/25 21:19
5+
* 图的广度优先遍历:需要借助队列
6+
* 图的深度优先遍历:需要借助栈
7+
* 对于同样一个图,基于邻接矩阵的遍历所得到的DFS序列和BFS序列是唯一的,基于邻接表的遍历所得到的DFS序列和BFS序列是不唯一的。
8+
* 所以我们现在使用邻接矩阵的方式表示
9+
*/
10+
public class DFS {
11+
12+
13+
}

0 commit comments

Comments
 (0)