A school assignment in which I simulated Prim's algorithm in Java to find the minimum spanning tree (MST) given a graph file and a root
Every line of your text file should be a single edge
An edge consists of two vertices and a weight in this order: vertex1 vertex2 weight
An example graph file is given as graph.in
To use:
Compile it in the holding directory with "javac MST.java"
Then run with the parameters "java MST.java graph_file root"
An example call: "java MST.java graph.in A"