Uses the DFS algorithm on adjacency matrices to output the connected components of an undirected simple graph as well as the total number of components.
Java
Download the src/lab1.java
along with the data1.txt
.
Run in the directory where you saved the files
$ javac lab1.java # compiles .java to .class bytecode
$ java lab1 <data1.txt # executes the .class file using Java's VM and the data.txt file as standard input.
Pull requests are welcomed.
I'm not responsible for anything you do with my code. By downloading this code you agree that anything you do with it is your sole responsibility. Please for the love of god do not submit this as your own code to any academic institution as that would be plagiarism and academic misconduct. This code is for instructional purposes only.