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

This problem is inspired by and, which you might want to solve first.

Consider n-dimensional grid, and you are moving from one corner to the farthest corner in a minimal number of moves. Each move corresponds to moving to a neighbouring hypercube (among possible up to 2*n neighbours). How many ways are there?

Input format is a row array of size "d" (for d dimension) with number of grid points on each direction.

Optional: can you solve it without loops?

Solution Stats

93.75% Correct | 6.25% Incorrect
Last Solution submitted on Apr 12, 2024

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers43

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!