added Kruskal's algorithm.

still need to write sorting algorithm, haven't tested