Given below is an undirected weighted graph:
Find the shortest paths between all pairs of nodes of the graph using the Floyd-Warshall algorithm. Print the resulting matrix to the field below.
For example, your output may look like this:
0 3 inf -1
3 0 4 0
inf 1 0 3
1 3 2 4