Added snippet kruskal

added kruscal
improved unionFind