Topic: Computer ScienceComputer Science | Java Programming BFSand DFS Assignment
The paths between nodes are represented as an nxn matrix, wheren is the number of nodes. Each slot in the matrix represent theweight of the path between corresponding nodes. Zero and Negativevalues represents non-exiting path. The matrix usually stored in afile in the following format, where the fist line representing thenode names, and subsequence lines representing the weight betweenthe any two nodes between the corresponding row and column.
A B C D E F …
0 1 2 0 2 1
1 0 0 0 1 1
…
You are required to implement a JAVA program
OR
OR