Explaination of the question.

https://leetcode.com/problems/predict-the-winner/

This is the question number 486. I am unable to understand it properly.
What is the question asking exactly -

  1. Should we tell if player 1 will win, though both the players make any possible moves?
  2. Should we tell that there is atleast 1 way in which both the players make choices, which shall eventually make player 1 the winner?

Also, what is the significance of the line: "You can assume each player plays to maximize his score."
What information does the above line provide? Is it necessary? Is it telling that at every step we take the maximum of the available choices? Is it telling that at every stage player chooses a number that will eventually lead him to victory. In this case how can a player know beforehand what choices to be made that can lead him to victory?

In the first test case too, it isn't very difficult to see a case where player 1 can win. => Player 1 takes 1 and 2, player 2 take 5.
In the second test case too, we can observe that player 2 can win => Player 1 takes 1 and 5, player 2 takes 7 and 233.

I am unable to get to understand the question properly. I would be grateful if someone can help me! Thank you!

Comments (1)