File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Greedy/Kruskal’sMinimumSpanningTree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 1
1
import java .util .Arrays ;
2
2
import java .util .Scanner ;
3
3
4
- public class Kruskal {
4
+ public class KruskalsMinimumSpanningTree {
5
5
int V ;
6
6
int E ; //Number of vertices and edges in the graph
7
7
Edge [] edge ;
@@ -33,7 +33,7 @@ public int compareTo(Edge other) {
33
33
}
34
34
}
35
35
36
- public Kruskal (int v , int e ) {
36
+ public KruskalsMinimumSpanningTree (int v , int e ) {
37
37
V = v ;
38
38
E = e ;
39
39
@@ -101,7 +101,7 @@ public static void main(String[] args) {
101
101
//and pass in the parameters v (vertices) and e (edges)
102
102
//The constructor of the Main class will initialize all our
103
103
//arrays for us.
104
- Kruskal graph = new Kruskal (v , e );
104
+ KruskalsMinimumSpanningTree graph = new KruskalsMinimumSpanningTree (v , e );
105
105
106
106
//Using a for-loop, input the information about each edge
107
107
for (int i = 0 ; i < e ; i ++) {
You can’t perform that action at this time.
0 commit comments