Given an m*n grid,
How many ways are there to go from upper left corner to the lower right one?
You can only move right and down, not up or left
Solution Stats
Problem Comments
3 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers75
Suggested Problems
-
Select every other element of a vector
36266 Solvers
-
How to find the position of an element in a vector without using the find function
2814 Solvers
-
Number of 1s in the Binary Representation of a Number
479 Solvers
-
Find the maximum number of decimal places in a set of numbers
3379 Solvers
-
Find the dimensions of a matrix
560 Solvers
More from this Author12
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
I think your answers in the test suite are for an (m+1)x(n+1) grid, as there are only two ways to reach the bottom right for a 2x2 grid. Check out http://www.mathworks.com/matlabcentral/cody/problems/1483-number-of-paths-on-a-grid for more details.
There are 6 ways of reaching the bottom right corner of a 2*2 grid. Are you considering m*n lines or m*n boxes?
I was considering m*n vertices, not boxes. If you have a 2x2 grid of boxes (3x3 vertices), then you're correct; there are six ways to reach the bottom. Just some miscommunication there.