Skip to content

Instantly share code, notes, and snippets.

View FastStonewkx's full-sized avatar

北方的游民何时归 FastStonewkx

View GitHub Profile
@FastStonewkx
FastStonewkx / GraphByMatrix.java
Created September 19, 2020 16:41
广度优先遍历和深度优先遍历
public class GraphByMatrix {
public static final boolean UNDIRECTED_GRAPH = false;//无向图标志
public static final boolean DIRECTED_GRAPH = true;//有向图标志
public static final boolean ADJACENCY_MATRIX = true;//邻接矩阵实现
public static final boolean ADJACENCY_LIST = false;//邻接表实现
public static final int MAX_VALUE = Integer.MAX_VALUE;
private boolean graphType;
private boolean method;