Created with Snap 1 2 3 4 5 6 7 Tree has 0 vertices and weight 0.004x.25x.5x1x2x4x?s = PickVertex()for v in Neighborhood(s):F.AddEdge((s,v))pred[v] = swhile not T.IsSpanning():(u,v) = F.MinimumEdge(weight)F.DeleteEdge((u,v))T.AddEdge((u,v))for w in Neighborhood(v):if weight[(pred[w],w)] > weight[(w,v)] \ and not T.Contains(w):F.DeleteEdge((pred[w],w))F.AddEdge((w,v))pred[w] = v1234567891011121314