Alice and Bob take turns playing a game with
You are given two integer arrays, aliceValues and bobValues, both of length i, she receives aliceValues[i] points. If Bob chooses the stone at index i, he receives bobValues[i] points.
On each turn, a player removes one unchosen stone from the game and adds its corresponding point value to their total score. The game ends when all stones have been removed. Both players play optimally to maximize their respective total scores.
Return
Constraints:
n == aliceValues.length == bobValues.length
n
aliceValues[i], bobValues[i]
Alice and Bob take turns playing a game with
You are given two integer arrays, aliceValues and bobValues, both of length i, she receives aliceValues[i] points. If Bob chooses the stone at index i, he receives bobValues[i] points.
On each turn, a player removes one unchosen stone from the game and adds its corresponding point value to their total score. The game ends when all stones have been removed. Both players play optimally to maximize their respective total scores.
Return
Constraints:
n == aliceValues.length == bobValues.length
n
aliceValues[i], bobValues[i]