Add Prim MST algorithm