Alice and Bob take turns playing a game, with **Alice starting first**. There are `n` stones in a pile. On each player's turn, they can **remove** a stone from the pile and receive points based on the stone's value. Alice and Bob may **value the stones differently**. You are given two integer arrays of length `n`, `aliceValues` and `bobValues`. Each `aliceValues[i]` and `bobValues[i]` represents how Alice and Bob, respectively, value the `i`th stone. The winner is the person with the most points after all the stones are chosen. If both players have the same amount of points, the game results in a **draw**. Both players will play **optimally**. Both players know the other's values. Determine the result of the game, and: - If Alice wins, return `1`. - If Bob wins, return `-1`. - If the game results in a draw, return `0`.
Example 1
Input: aliceValues = [1,3], bobValues = [2,1]
Output: 1
Explanation: Combined values: stone0=3, stone1=4. Alice takes the higher (stone1, +3), Bob takes stone0 (+2). Alice 3 > Bob 2 → 1.
Example 2
Input: aliceValues = [1,2], bobValues = [3,1]
Output: 0
Explanation: Combined: stone0=4, stone1=3. Alice takes stone0 (+1), Bob takes stone1 (+1). 1 = 1 → draw → 0.
Example 3
Input: aliceValues = [2,4,3], bobValues = [1,6,7]
Output: -1
Explanation: Combined: 3, 10, 10. Bob ends ahead, so return -1.
Taking stone i does two things: it gains you your value, AND it denies the opponent their value. The true priority of a stone is aliceValues[i] + bobValues[i]. Sort stones by that sum, descending; players alternate picking from the top, Alice first.
Run checks all cases above. Submit evaluates all test cases.