Optimal game strategy 2


getting runtime error

Hey @dakshi
Issue was due to global array size of dp begin too large and then you’re using recursion which again takes a lot of memory
Firstly its 2D DP and not 3D DP so think of that
Secondly Try to solve this question using iteration instead of recursion to prevent stack memory overflow