Skip to content

Commit 1ea49fa

Browse files
author
volimroze
committed
Remove unused INF field to fix PMD issue
1 parent 345da9e commit 1ea49fa

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/main/java/com/thealgorithms/datastructures/graphs/EdmondsAlgorithm.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import java.util.List;
66

77
public class EdmondsAlgorithm {
8-
private static final int INF = Integer.MAX_VALUE;
98

109
// Class to represent edges in the graph
1110
static class Edge {
@@ -24,7 +23,7 @@ static class Edge {
2423
public static int maxWeightMatching(List<Edge> edges, int n) {
2524
// The number of nodes in the graph
2625
int[] match = new int[n];
27-
Arrays.fill(match, -1); // no match
26+
Arrays.fill(match, -1); // no match
2827

2928
// Perform the algorithm
3029
int result = 0;
@@ -67,7 +66,7 @@ public static void main(String[] args) {
6766
edges.add(new Edge(2, 3, 25));
6867
edges.add(new Edge(3, 4, 30));
6968

70-
int n = 5; // Number of vertices
69+
int n = 5; // Number of vertices
7170

7271
System.out.println("Maximum weight matching: " + maxWeightMatching(edges, n));
7372
}

0 commit comments

Comments
 (0)