Prim's algorithm is a greedy algorithm that is used to find a minimum spanning tree for a weighted undirected graph. The algorithm starts with an arbitrary vertex and adds the lowestweight edge that connects a vertex in the tree to a vertex not in the tree, until all vertices are in the tree. This process is repeated until a minimum spanning tree is found. It can also be used in finding the shortest path in a graph, and it is similar to Dijkstra's algorithm but used for graph with undirected edges.
#primsalgorithminhindi
#prim'salgorithminhindi
#primsalgorithm