C++ solution using prefix sum and suffix sum. stay permission less
IntuitionApproachsimply create the prefix sum array and suffix sum array and then
if sum of prefix is grreater than equal to the next index of suffix sum then p
# Intuition
 
# Approach
  simply create the prefix sum array and suffix sum array and then 
 if sum of prefix is grreater than equal to the next index of suffix sum then possible to split the array we count the number of ways and return it;

# Complexity
- Time complexity:
        0(N) // size of nums

- Space complexity:
  0(N)// prefix sum arr or suffix sum arr

# Code
```cpp []
#define ll long long 
class Solution {
public:
    int waysToSplitArray(vector<int>& nums) {
        int n=nums.size(),cnt=0;
 
vector<ll>pre(n),suf(n);
  // prefix sum       
  pre[0]=nums[0];
  for(int i=1;i<n;i++)pre[i]+=pre[i-1]+nums[i];
  // suffix sum
suf[n-1]=nums[n-1];
for(int i=n-2;i>=0;i--)suf[i]+=suf[i+1]+nums[i];
// checking if prefix(i) sum >=sufix(i+1)
for(int i=0;i<n-1;i++){
    if(pre[i]>=suf[i+1])cnt++;
}
return cnt;
    }
};
```
['C++']