Cody

Solution 1540869

Submitted on 26 May 2018 by J. S. Kowontan
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
x = [0 1 Inf Inf; Inf 0 2 Inf; Inf Inf 0 3 4 7 Inf 0]; y_correct = [0 1 3 6; 9 0 2 5; 7 8 0 3; 4 5 7 0]; assert(isequal(floydwarshall(x),y_correct))

2   Pass
x = [0 8 Inf 1; Inf 0 1 Inf; 4 Inf 0 Inf; Inf 2 9 0]; y_correct = [0 3 4 1 5 0 1 6 4 7 0 5 7 2 3 0]; assert(isequal(floydwarshall(x),y_correct))

Suggested Problems