import java.util.ArrayList; import java.util.Collection; import java.util.Collections; // public class Path { private Graph G; private int s; private int t; private boolean[] visited; private int[] pre; public Path(Graph G , int s, int t){ G.validateVertex(s); G.validateVertex(s); this.G = G; this.s = s; // 原点 this.t = t; visited = new boolean[G.V()]; pre = new int[G.V()]; for(int i=0;i