You are given two player1 and player2, representing the number of pins knocked down by player
The score of a player is calculated as the sum of points awarded in each turn. The points awarded in turn i are defined as:
player1[i] (or player2[i]) if the player knocked down
player1[i] (or player2[i]) otherwise.
Determine the winner of the game:
Return
Return
Return
Constraints:
n player1.length player2.length
n
player1[i], player2[i]
You are given two player1 and player2, representing the number of pins knocked down by player
The score of a player is calculated as the sum of points awarded in each turn. The points awarded in turn i are defined as:
player1[i] (or player2[i]) if the player knocked down
player1[i] (or player2[i]) otherwise.
Determine the winner of the game:
Return
Return
Return
Constraints:
n player1.length player2.length
n
player1[i], player2[i]