MCPcopy
hub / github.com/wangzheng0822/algo / addEdge

Method addEdge

java/30_graph/Graph.java:28–32  ·  view source on GitHub ↗

添加边 @param s 顶点 @param t 顶点

(int s, int t)

Source from the content-addressed store, hash-verified

26 * @param t 顶点
27 */
28 public void addEdge(int s, int t) { // 无向图一条边存两次
29 adj[s].add(t);
30 adj[t].add(s);
31
32 }
33
34 public void bfs(int s, int t) {
35 if (s == t) return;

Callers 2

mainMethod · 0.95
dsf.jsFile · 0.45

Calls 1

addMethod · 0.45

Tested by

no test coverage detected