below code passed sample test cases but fail on submitting. any one please figure out what’s wrong going on.
Game Theory -2 problem
n=3
piles: 1 4 3
for this input correct answer = 1, your answer = 2
how?
first player1 leaves 2 stones in pile2, piles: 1 2 3
next player2 leaves 1 stone in pile3, piles: 1 2 1
next player1 leaves 1 stone in pile2, piles: 1 1 1
now player2 cannot move hence player 1 wins
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.