Alice and Bob are playing a game with several piles of stones. You are given an integer array piles, where piles[i] denotes the number of stones in the
Alice and Bob take turns, with Alice making the first move. On each turn, a player chooses any non empty pile and removes any positive number of stones from that pile. The game ends when all piles are empty. The player who cannot make a move loses the game.
Assuming both players play optimally, return true if Alice wins the game, or false otherwise.
Constraints:
n == piles.length
n
piles[i]
Alice and Bob are playing a game with several piles of stones. You are given an integer array piles, where piles[i] denotes the number of stones in the
Alice and Bob take turns, with Alice making the first move. On each turn, a player chooses any non empty pile and removes any positive number of stones from that pile. The game ends when all piles are empty. The player who cannot make a move loses the game.
Assuming both players play optimally, return true if Alice wins the game, or false otherwise.
Constraints:
n == piles.length
n
piles[i]