Amazon interview question

Find the Minimum spanning tree