Help me out in this
please wait i have to check eveything.
hello @shivammishra20121999 see this :
in my times also i was also suggested not to declare anything as global while doing dynamic programming.
Happy Learning!!
your code is perfetly fine and your logic too but just declaring the dp array as global was wrong.
Hello @shivammishra20121999 if you feel that your doubt is cleared you can now mark this doubt as resolved.
Happy Learning!!
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.