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.
Find state names that end with the letter A
Remove the polynomials that have positive real elements of their roots.
Project Euler: Problem 8, Find largest product in a large string of numbers
Back to basics 9 - Indexed References
Do Fast Fourier Transformation
Speed of light:Experiment
How many rectangles in a grid ?
rectangle in circle
Find the treasures in MATLAB Central and discover how the community can help you!
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office