(int v)
| 12 | private boolean visited[]; //to keep track of the node which are visited. |
| 13 | |
| 14 | Graph(int v){ |
| 15 | this.v = v; |
| 16 | this.adj = new LinkedList[v]; |
| 17 | this.visited = new boolean[v]; |
| 18 | for(int i=0;i<this.v;i++) { |
| 19 | adj[i] = new LinkedList<Integer>(); |
| 20 | this.visited[i] = false; |
| 21 | } |
| 22 | |
| 23 | } |
| 24 | |
| 25 | |
| 26 | public void addEdge(int u,int v) { // edge from u -> v |
nothing calls this directly
no outgoing calls
no test coverage detected