Add Kruskal and Prim Algorithm implementations