Optimal game strategy - II problem


Code is giving compilation error

Hello @jha.aparna17, https://ide.codingblocks.com/s/391564 pls review this now the test case is working fine on this. You don’t need to pass on this big dp array again and again. You have defined the dp size around 1e8 and as you are passing on it again and again it is filling a lot of memory into the system.
I hope it is clear to you. Pls, mark it as resolve if it is clear to you. And feel free to ask if there is any doubt.
Thanks :slight_smile:

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.