JAVA:实现Prim求最小生成树MST算法
package com.thealgorithms.datastructures.graphs;
/**
* A Java program for Prim's Minimum Spanning Tree (MST) algorithm. adjacency
* matrix representation of the graph
*/
class PrimMST {
// Number of vertices in the graph
private static