Dynamic Programming, Facebook Coding Interview, Google Coding Interview, Coding Interviews, Java.
paths in matrix. Given a nxm matrix, count number of ways to reach from top left corner to bottom right corner. Input 2 integers n and m Dp state dp[i][j] represents no of ways to reach from cell(0,0) to cell(i,j) dp[0][0] = 1 i = 0 to n-1 j = 0 to n-1 dp[i][j] = dp[i-1][j] + dp[i][j-1] Thanks for