You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make several improvements to the kruskalGraph method.
First, the method is now quite a bit more efficient. Rather than
finding and sorting only the weights of the edges in the graph, and then
searching through the graph to find those edges at each step in the
algorithm, the edges with the weights are all listed and sorted by
weight (more like the actual sorted edges algorithm works). So there is
no need to find the edge later, you just follow the algorithm and
process the edges in order.
Also make the algorithm terminate once the minimal spanning tree is
complete as it should.
Second, the return value of the method returns more data. See the
updated POD for good documentation on what is returned.
This makes the method return more useful information that can be used
for constructing a solution to problems using the sorted edges
algorithm.
These is the basically the same changes that were made for the
`sortedEdgesPath` method.
0 commit comments