Google Interview Question

minimum spanning tree O(n^2) algorithm