Can someone explain the meaning of the sentence in question :" Player 1 picks one of the numbers from either end of the array followed by the player 2 and then player 1 and so on."


  • 0

    So, I don't understand what author want to say from " Player 1 picks one of the numbers from either end of the array followed by the player 2 and then player 1 and so on." Is there any mistake in this sentence?
    Player 1 picks either end of the array or what?
    Why player 1 should followed by player 2? I think player 1 pick first, right?


  • 0
    X

    The statement is correct but just a little bit arcane.

    1. either end = both ends.

    2. "followed by the player 2" means player 2 follows player 1

    Make it more readable:
    Player 1 picks either the first or the last element of the array, then player 2 picks and then so on.


Log in to reply
 

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