Piles of stones are arranged in a row (an even number of piles, odd total). Two players alternately take a whole pile from either end, and the player with more stones wins. Assuming optimal play, return true if the first player wins. The input is JSON {piles}.
Input: JSON {piles}.
Output: Boolean — true if the first player wins.
Input: {"piles":[5,3,4,5]}
Output: true
Explanation: First player can force a win.Input: {"piles":[3,7,2,3]}
Output: true
Explanation: First player wins.Input: {"piles":[1,2]}
Output: true
Explanation: Take the larger pile.2<=n<=100n even