I am having a hard time understanding Floyd-Warshall algorithm. I know how it works as in I know how to do it by hand but I need to understand it through a computer perceptive.
FOR k <-- 1 TO N DO
FOR i <-- 1 TO N DO
FOR j <-- TO N DO
IF Djk + Dkj < DiJ THEN
Dij <-- djk + dkj
k
, i
and j
are variables for iteration and and it iterates till n
value, and I guess
it s a nested loop and then it looks at each node less then it finds shortest path?