Why is the testcase [0,0,7,6,5,6,1] should return False?


  • 0
    W

    Hi, I am now stucked at the last testcase and can't figure out why
    [0,0,7,6,5,6,1] should return False.

    Here's the reason I think it should return True.
    Player 1 chooses 1 [0,0,7,6,5,6] Player1: 1, Player2: 0
    Player 2 chooses 6 [0,0,7,6,5] Player1: 1, Player2: 6
    Player 1 chooses 5 [0,0.7,6] Player1: 6, Player2: 6
    Player 2 chooses 6 [0,0,7] Player1: 6, Player2: 12
    Player 1 chooses 7 [0,0] Player1: 13, Player2: 12

    The Player 1 will eventually win. So it should return True.


  • 1
    Y
    This post is deleted!

  • 0
    W

    Thanks, it is of great help!


  • 0
    K

    I got the same question, @wf94. I think in this case both could win since there's no rule on how each player should play the game.

    Can you post the deleted answer if you remember? It will really helps. Thanks in advance.


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.