graph_algorithm
graph_algorithm copied to clipboard
kruskal issue
The loop condition in 'kruskal.py' is: while len(visited) < len(nodes): If the code have visited all the nodes, the whole algorithm will end. But if the code generate some subgraph that does not connect, the algorithm will also end.
The loop condition in 'kruskal.py' is: while len(visited) < len(nodes): If the code have visited all the nodes, the whole algorithm will end. But if the code generate some subgraph that does not connect, the algorithm will also end.
Also met this problem