Programming Homework Help
Programming Homework Help. New question
Read in a graph
- Your program should read in a text file (use a Scanner) that has a adjacency matrix. Some algorithms will expect a weighted graph, but one will expect a directional graph(1s and 0s). You can assume the matrix will always be symmetrical, the rows and columns represent the nodes so it has to be symmetrical. You will need to read in a weighted graph for some of the weighted graph algorithms in the out-lab, and a (directional) boolean graph for reachability algorithms. Example: