Context added

This commit is contained in:
MarcosVillacanas
2020-07-06 13:00:35 +02:00
parent dd06589833
commit bf0fdd735a

View File

@ -1,4 +1,9 @@
package Kruskal; //Problem -> Connect all the edges with the minimum cost.
//Possible Solution -> Kruskal Algorithm (KA), KA finds the minimum-spanning-tree, which means, the group of edges with the minimum sum of their weights that connect the whole graph.
//The graph needs to be connected, because if there are nodes impossible to reach, there are no edges that could connect every node in the graph.
//KA is a Greedy Algorithm, because edges are analysed based on their weights, that is why a Priority Queue is used, to take first those less weighted.
//This implementations below has some changes compared to conventional ones, but they are explained all along the code.
//In case you need to know anyhing else, I would be willing to answer all your doubts, you can contact me by https://www.linkedin.com/in/marcosvillacanas/
import java.util.Comparator; import java.util.Comparator;
import java.util.HashSet; import java.util.HashSet;