Problem 44072. Number of paths on a n-dimensional grid

Solution 1953384

Submitted on 30 Sep 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
NdRowVector = [3,3,3,3,3]; y_correct = 113400; assert(isequal(countNdPath(NdRowVector),y_correct))

2   Pass
NdRowVector = [1,3,3,3,3,1,1,1,3,3]; y_correct = 7484400; assert(isequal(countNdPath(NdRowVector),y_correct))

3   Pass
NdRowVector = [2,2,2,2,2,2,2,1,1,2,2,2,2]; y_correct = 39916800; assert(isequal(countNdPath(NdRowVector),y_correct))

Suggested Problems

More from this Author9

Community Treasure Hunt

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

Start Hunting!