Dp wildcard pattern matching


one test case not passing
Not able to find out the error

hello @nischay1111
i have checked ur code ,it is correct.
it is not passing the last test case because of too much memory.
try to add some space optimisation.
hint -> dp[i][j] depends only on dp[i-1][j] , dp[i][j-1] (i.e either on current row or last visited row).

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.