Stone Game II
Alice and Bob continue their games with piles of stones. There are a number of piles arranged in a row, and each pile has a positive integer number of stones, piles[i].
The objective of the game is to end with the most stones.
Alice and Bob take turns, with Alice going first. On each player's turn, that player can take all the stones in the first X remaining piles, where 1 <= X <= 2M. After taking, M = max(M, X). The game starts with M = 1.
The game ends when all the piles have been taken. Assuming Alice and Bob play optimally, return the maximum number of stones Alice can get.
Stone Game II
Alice and Bob continue their games with piles of stones. There are a number of piles **arranged in a row**, and each pile has a positive integer number of stones, `piles[i]`.