There is a robot on an m x n grid. The robot is initially located at the top-left corner (i.e., grid[0][0]). The robot tries to move to the bottom-right corner (i.e., grid[m-1][n-1]). The robot can only move either down or right at any point in time.
Given the two integers m and n, return the number of possible unique paths that the robot can take to reach the bottom-right corner.
Recurrence Relation: dp[i][j] = dp[i-1][j] + dp[i][j-1]
The number of ways to reach cell (i,j) is the sum of ways to reach the cell above and the cell to the left.
Base Case: dp[0][j] = 1 and dp[i][0] = 1 (only one way to reach any cell in the first row or column).
m = 3, n = 728m = 3, n = 23m = 1, n = 111 <= m, n <= 100Click "Run" to execute your code against test cases
Socratic guidance - I'll ask questions, not give answers