Kruskal's algorithm in Java

by javadream on 09 Apr 11
0
 
1161 downloads
0

Kruskal's algorithm is well known for finding MST or minimum spanning tree. First it sorts all the edges in non-decreasing order. Then, it keeps taking edges from the sorted list given that, at least one of the vertices at two ends of the edge is not discovered before. Current implementation uses java and pretty straight forward approach. It can be further improved by imporving sorting algorithm and using a custom Set data structure for set operations.

Bookmark and Share

You must login or register to post comments