Kruskal algorithm with user interface