Skip to content

A school assignment in which we simulated Prim's algorithm in Java to find the minimum spanning tree (MST) given a graph and a root

Notifications You must be signed in to change notification settings

abau2002/Minimum-Spanning-Tree-JAVA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minimum-Spanning-Tree-JAVA

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"

About

A school assignment in which we simulated Prim's algorithm in Java to find the minimum spanning tree (MST) given a graph and a root

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages