(String args[])
| 33 | } |
| 34 | |
| 35 | public static void main(String args[]) { |
| 36 | Scanner sc = new Scanner(System.in); |
| 37 | System.out.println("Enter number of vertices"); |
| 38 | int ve = sc.nextInt(); |
| 39 | DFSTraversal graph = new DFSTraversal(ve); |
| 40 | System.out.println("Enter number of edges"); |
| 41 | int e = sc.nextInt(); |
| 42 | for (int i = 0; i < e; i++) { |
| 43 | System.out.println("Enter starting vertex of the edge " + i); |
| 44 | int u = sc.nextInt(); |
| 45 | System.out.println("Enter ending vertex of the edge " + i); |
| 46 | int v = sc.nextInt(); |
| 47 | graph.insertEdge(u, v); |
| 48 | } |
| 49 | System.out.println("Depth First Traversal for the graph is:"); |
| 50 | graph.DFS(0); |
| 51 | } |
| 52 | } |
nothing calls this directly
no test coverage detected