Cody

Solution 1966399

Submitted on 8 Oct 2019 by Sean Kavanagh
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   Pass
assert(isequal(maxPathSum(tril(magic(10))),891))

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

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

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