Cameron McLeman's "Minimum Spanning Tree"
Read about minimum spanning trees and try to figure out how Prim's algorithm works; the solution can be found here. Before you check the solution, try to solve problem yourself. After you have solved the problem (or if you have spent a couple of hours working on it, and are stumped!), study the solution.