You are given an integer array nums. Two players take turns choosing a number from either end of the array. Each chosen number is added to the choosing player’s score, and the chosen element is removed from the array.
Both players play optimally. Return true if player false otherwise.
Note: A player wins if their score is greater than or equal to the other player’s score.
Constraints:
1 <= nums.length <= 20
0 <= nums[i] <= 10^7
You are given an integer array nums. Two players take turns choosing a number from either end of the array. Each chosen number is added to the choosing player’s score, and the chosen element is removed from the array.
Both players play optimally. Return true if player false otherwise.
Note: A player wins if their score is greater than or equal to the other player’s score.
Constraints:
1 <= nums.length <= 20
0 <= nums[i] <= 10^7