what’s the problem with this code
Please check out this code
- why are you maintaining cnt variable. There is not need to use it. Simply change line 10 to if(i == n and j == m)return dp[i][j]=1;
- line 14 and 16 is not required. Comment out them
- change line 17 to if(dp[i][j])return dp[i][j];
- add modulo in line 15 too.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.