I’ve written bot bottom up and top down approach but they are giving run error on few test cases. But it runnig fine on my IDE.
Code producing Runtime error on Equalize String problem
Here is the link to my code
Thanks a lot It worked.
But can you please explain why we need to declare the dp array globally and why It didn’t worked locally ???
in global scope we can decalre large memory compared to function scope ,thats why
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.