Easy Solution || Explained 
IntuitionThe idea is to iterate through the array while keeping track of the sum of the elements to the left and right of the current split. If the sum of the l
# Intuition
The idea is to iterate through the array while keeping track of the sum of the elements to the left and right of the current split. If the sum of the left part is greater than or equal to the sum of the right part, it counts as a valid split.

# Approach
1. **Calculate Total Sum:** First, compute the total sum of the array.  
2. **Iterate through the Array:** Iterate through the array, keeping a running sum of the left side (`s`).  
3. **Check Condition:** For each split (except the last element), check if the left sum (`s`) is greater than or equal to the remaining sum (`sum`).  
4. **Update Count:** If the condition holds, increment the count of valid splits.  
5. **Return the Count:** Return the total number of valid splits.

# Complexity
- **Time complexity:** \(O(n)\) – The algorithm traverses the array once.  
- **Space complexity:** \(O(1)\) – Only a few variables are used for summing, so the space usage is constant.

# Code
```cpp
class Solution {
public:
    int waysToSplitArray(vector<int>& nums) {
        long long sum = 0;
        for(auto i: nums) sum += i; // Calculate the total sum
        long long s = 0, ans = 0;
        for(int i = 0; i < nums.size() - 1; ++i) {
            s += nums[i];          // Update left sum
            sum -= nums[i];        // Update right sum
            if (s >= sum) ans++;   // Check condition and update count
        }
        return ans;
    }
};

['Array', 'Math', 'C++']