Partb 7
Partb 7
h>
#include <limits.h>
// Function to find the vertex with the minimum key value that is not yet included
in the MST
int minKey(int key[], int mstSet[], int n) {
int min = INT_MAX, minIndex;
int v;
for ( v = 0; v < n; v++) {
if (mstSet[v] == 0 && key[v] < min) {
min = key[v], minIndex = v;
}
}
return minIndex;
}
int main() {
int n,i,j;
int graph[MAX][MAX];
return 0;
}