Problem 1483. Number of paths on a grid
57.14% Correct | 42.86% Incorrect
Last Solution submitted on Jan 29, 2023
Show 2 older comments
Tim on 2 May 2013
It would be more elegant to define the solution for the 1x1 case as 1 rather than 0.
G K on 11 May 2013
agree, but will leave as so, so as to not affect submitted solutions.
Rafael S.T. Vieira on 20 Jul 2020
I disagree with the base case. A 1x1 matrix has 1 path. And, the empty matrix has no path (zero).
goc3 on 28 Sep 2020
The first test case has been changed from 0 to 1 without rescoring past solutions.
Tyler on 13 Jul 2022
Very interesting problem when you think about it.
Jonathan on 10 Jan 2020
The first test case is incorrect. The null path (starting and ending at the same place) is a solution. The 1x1 case should have 1 solution.
Problem Recent Solvers65
All your base are belong to us
ZigZag matrix with reflected format
More from this Author10
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!