1. variable k shows the number of nodes we will route through during the path eg.
k=0 means no routing nodes and just the direct path A → B .
k=1 equals 1 route node A → C → B
2. we need to find the shortest paths between each pair for each value of k up to k = n (meaning every node in the graph is used as an intermediate node)
3. 3 nested for loops.
1. for each value of k
2.
foreachnodei 3.
compareeachnodeitoeachnodej i and j iterations are needed when searching through a 2D matrix and k is specific to the FW algorithm to find new paths
4. ==**using the number of intermediate nodes k and the 2 nodes i and j, calculate the cost of the path using the Distance Matrix**==
5. ==**if the cost of the new path is less than the cost of the existing path i → j saved to Path Matrix, save the new cost to the Path Matrix**==
6. carry out the pink park for all the 3 loops stated above to parse every value of k, j, and i
7. return the final Path Matrix