Algorithm for minimizing the weighted sum of jobs completion times
Prim's minimum spanning tree algorithm