End of Year Sale: Use Coupon Code END2025 to Get Extra 25% Off.
nums.\n2. Initialize result to 0 to store the number of good splits.\n3. Iterate over the array with index i, which represents the end of the left subarray.\n4. For each i, initialize two pointers j and k to find the range of valid mid subarrays.\n5. Move j to the right to find the minimum index where the sum of mid is greater than or equal to the sum of left.\n6. Move k to the right to find the maximum index where the sum of right is greater than or equal to the sum of mid.\n7. Add the number of valid mid subarrays to result (i.e., k - j).\n8. Return result modulo 10^9 + 7.