how can i reduce the memory limit in this approach??
here is my solution
MEMORY LIMIT EXCEEDED
Hey @Shobhit_kumar
You have to solve this using 2D dp ,n,a,b<=5000 hence 3d matrix gives MLE.
Here refer to this soln for 2D DP
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.