Skip to content

Commit 273dfeb

Browse files
author
jsroyal
committed
remove main function
1 parent 5288959 commit 273dfeb

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

src/com/jwetherell/algorithms/graph/DepthFirstTraversal.java

-18
Original file line numberDiff line numberDiff line change
@@ -37,23 +37,5 @@ public static void depthFirstTraversal(int[][] a, int[] visited,int source){
3737
stack.pop();
3838
}
3939
}
40-
41-
42-
public static void main(String[] args) {
43-
int n = 5; //no. of vertic
44-
int[] visited = new int[n];
45-
arr = new int[n];
46-
// Adjacency Matrix of graph
47-
int[][] a = new int[][] {{0, 1, 0, 1, 0},
48-
{0, 0, 0, 1, 1},
49-
{1, 1, 0, 1, 0},
50-
{0, 0, 0, 0, 0},
51-
{0, 0, 1, 0, 0}};
52-
depthFirstTraversal(a, visited, 0);
53-
for (int element : arr) {
54-
if(element != -1) //not direct connected
55-
System.out.println(element);
56-
}
57-
}
5840
}
5941

0 commit comments

Comments
 (0)