import java.util.*; public class primMST{ static int N; static int[][] graph; static void primMST(){ int[] key = new int[N]; boolean[] mstSet = new boolean[N]; int[] parent = new int[N]; Arrays.fill(key, Integer.MAX_VALUE); key[0] = 0; parent[0]=-1; for(int count =0;count