it passes the sample case but not passes the test cases
Optimal Game Strategy 1
@naazsayma123
there is a mistake in q2 variable recurisve case :- the recursive cases will be optimal_strategy(a,i,j-2) and optimal_strategy(a,i+1,j-1)
i think you have done typing error in writing because most of the code logic is correct.
I hope it helps, please mark the doubt as resolved if solved now.