We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c47c59a commit b2757b5Copy full SHA for b2757b5
src/main/java/com/thealgorithms/datastructures/graphs/BoruvkaAlgorithm.java
@@ -76,12 +76,11 @@ private static class Component {
76
* Represents the state of Union-Find components and the result list
77
*/
78
private static class BoruvkaState {
79
- List<Edge> result;
+ List<Edge> result = new ArrayList<>();;
80
Component[] components;
81
- Graph graph;
+ final Graph graph;
82
83
- BoruvkaState(Graph graph) {
84
- this.result = new ArrayList<>();
+ BoruvkaState(final Graph graph) {
85
this.components = initializeSubsets(graph);
86
this.graph = graph;
87
}
0 commit comments