easy solution prefix sum
IntuitionThe problem involves splitting the array into two non-empty parts such that the sum of the left part is greater than or equal to the sum of the right p
# Intuition
The problem involves splitting the array into two non-empty parts such that the sum of the left part is greater than or equal to the sum of the right part. To solve this, we need a way to calculate the sums of both parts efficiently at each potential split point.

# Approach
Suffix Sums: Precompute an array p with suffix sums for quick right-part calculations.
Left Sum Calculation: Use a running sum s for the left part while iterating through the array.
Count Splits: For each split point, if s >= p[i+1], increment the count.
Result: Return the count of valid splits.

# Complexity
- Time complexity:
O(n)

- Space complexity:
O(n)

# Code
```python3 []
class Solution:
    def waysToSplitArray(self, nums: List[int]) -> int:
        n=len(nums)
        p=[0]*n
        p[-1]=nums[-1]
        for i in range(n-2,-1,-1):
            p[i]=p[i+1]+nums[i]
        c=0
        s=0
        for i in range(n-1):
            s+=nums[i]
            if s>=p[i+1]:
                c+=1
        return c
        
        
        
```
['Python3']