You are given an integer array nums of length n.
A partition is formed by splitting nums into two non empty contiguous subarrays: a left subarray consisting of elements from index i, and a right subarray consisting of elements from index i + 1 to index n - 1, where
Return the number of partitions where the difference between the sum of elements in the left subarray and the sum of elements in the right subarray is even.
Constraints:
nums.length
nums[i]
You are given an integer array nums of length n.
A partition is formed by splitting nums into two non empty contiguous subarrays: a left subarray consisting of elements from index i, and a right subarray consisting of elements from index i + 1 to index n - 1, where
Return the number of partitions where the difference between the sum of elements in the left subarray and the sum of elements in the right subarray is even.
Constraints:
nums.length
nums[i]