Prims algo
Prims algo
#include <iostream>
#include <vector>
#include <climits>
const int V = 5;
int graph[V][V] = {
{0, 2, 0, 6, 0},
{2, 0, 3, 8, 5},
{0, 3, 0, 0, 7},
{6, 8, 0, 0, 9},
{0, 5, 7, 9, 0}
};
int main() {
int parent[V];
int key[V];
bool mstSet[V];
mstSet[u] = true;