Prim's algorithm is applied to a connected weighted graph with n vertices, it actually produced a minimal spanning tree. Let T be as in the algorithm - the is, T is a set to which we add edges one at a time until we get a spanning tree. I read but do not quite understand.

Read the algorithm's instructions itself and follow them. If you can't understand, ask yourself why you can't understand the written instructions, and fix the holes in your knowledge so that you do understand.

Read the algorithm's instructions itself and follow them. If you can't understand, ask yourself why you can't understand the written instructions, and fix the holes in your knowledge so that you do understand.