Coursera (Introduction to algorithms II) kruskal