Cody

Solution 1976898

Submitted on 15 Oct 2019 by Luu Van Duc
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
xy = [3,4; 0,0; 0,1; 1,1]; z_correct = 7; assert(isequal(walked(xy),z_correct))

z = 0 b = -3 -4 z = 5 b = 0 1 z = 6 b = 1 0 z = 7

2   Pass
xy = [3,4; 0,0]; z_correct = 5; assert(isequal(walked(xy),z_correct))

z = 0 b = -3 -4 z = 5

3   Pass
xy = [0,0; 5,12; 0,12]; z_correct = 18; assert(isequal(walked(xy),z_correct))

z = 0 b = 5 12 z = 13 b = -5 0 z = 18

Suggested Problems

More from this Author100