Cody

# Problem 45428. Minimal Path - 01

Solution 2199760

Submitted on 8 Apr 2020
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   Fail
x = [2 2 2 2 2 10 10 10 1 2 20 20 20 1 2 30 30 30 30 2]; assert(isequal(minimal_path(x),14))

ans = 12

Output argument "y" (and maybe others) not assigned during call to "minimal_path". Error in Test1 (line 5) assert(isequal(minimal_path(x),14))

2   Fail
x = [2 2 2 2 2 0 0 10 1 2 20 0 20 1 2 30 0 0 3 2]; assert(isequal(minimal_path(x),7))

ans = 5

Output argument "y" (and maybe others) not assigned during call to "minimal_path". Error in Test2 (line 5) assert(isequal(minimal_path(x),7))

3   Fail
x = [100 20 30 40 50 60 70 80 90 100]; assert(isequal(minimal_path(x),340))

ans = 240

Output argument "y" (and maybe others) not assigned during call to "minimal_path". Error in Test3 (line 3) assert(isequal(minimal_path(x),340))

4   Fail
x = [11 111 23 45 67 -500 34 23 22 32 432 1234 12 1244 -544 44 1 2 3 4 5 6 7 8 -12000 45 6 7 8 433 664 2344]; assert(isequal(minimal_path(x),-8459))

ans = -8470

Output argument "y" (and maybe others) not assigned during call to "minimal_path". Error in Test4 (line 5) assert(isequal(minimal_path(x),-8459))

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!