Cody

Solution 2341723

Submitted on 22 May 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   Pass
x = [3 0 0 0 7 4 0 0 2 4 6 0 8 5 9 3]; assert(isequal(maxPathSum(x),23))

2   Fail
assert(isequal(maxPathSum(tril(magic(10))),891))

Assertion failed.

3   Fail
assert(isequal(maxPathSum(tril(magic(100)^2)),251716502500))

Assertion failed.

4   Fail
assert(isequal(maxPathSum(tril(mod(magic(1000),997))),741570))

Assertion failed.

5   Fail
assert(isequal(maxPathSum(tril(gallery('integerdata',1e4,5e3,4))),37455089))

Assertion failed.