new branch
Everything done except kruskal, it fails sometimes, it needs two extra
methods, isConnected() and hasCycles()
Kruskal finished using disjointed sets.