Hi,
I had a doubt on a question and one of the test cases (Optimal Game Strategy-I)
https://online.codingblocks.com/app/player/159474/content/152399/4939/code-challenge
The end of the question says that:
“Determine the maximum value that Piyush can win with if he moves first. Both the players play optimally.”
What about testcases which are such that if you are the first to pick, AND both play optimally, you will lose?
like this test case:
10
22 50 16 13 8 41 25 43 8 7
Piyush - Nimit
22 - 50
16 - 13
8 - 41
25 - 43
8 - 7
Total
79 - 154
Piyush looses as he picked first!
(this is the reason some of my test cases are failing, as the output of the testcase is showing Nimit’s score instead of Piyush)