File tree 1 file changed +2
-3
lines changed
src/main/java/com/thealgorithms/datastructures/graphs
1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 5
5
import java .util .List ;
6
6
7
7
public class EdmondsAlgorithm {
8
- private static final int INF = Integer .MAX_VALUE ;
9
8
10
9
// Class to represent edges in the graph
11
10
static class Edge {
@@ -24,7 +23,7 @@ static class Edge {
24
23
public static int maxWeightMatching (List <Edge > edges , int n ) {
25
24
// The number of nodes in the graph
26
25
int [] match = new int [n ];
27
- Arrays .fill (match , -1 ); // no match
26
+ Arrays .fill (match , -1 ); // no match
28
27
29
28
// Perform the algorithm
30
29
int result = 0 ;
@@ -67,7 +66,7 @@ public static void main(String[] args) {
67
66
edges .add (new Edge (2 , 3 , 25 ));
68
67
edges .add (new Edge (3 , 4 , 30 ));
69
68
70
- int n = 5 ; // Number of vertices
69
+ int n = 5 ; // Number of vertices
71
70
72
71
System .out .println ("Maximum weight matching: " + maxWeightMatching (edges , n ));
73
72
}
You can’t perform that action at this time.
0 commit comments