Easy Solution || 2ms ✅ || Beats 100%👌|| Prefix Sum 👍
IntuitionApproachComplexity
Time complexity:

Space complexity:
Code
# Intuition
![Screenshot 2025-01-03 105031.png](https://assets.leetcode.com/users/images/fa3d46a0-8e71-4353-9c6b-96008c1260c4_1735881718.7586474.png)
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```java []
class Solution 
{
    public int waysToSplitArray(int[] nums) 
    {
        long sum = 0;
        long left = 0;
        int count = 0;
        for(int i = 0; i < nums.length; i++) sum += nums[i];

        for(int i = 0; i < nums.length-1; i++)
        {
            left += nums[i];
            sum -= nums[i];
            if(left >= sum) count++;
        }
        return count;
    }
}
```
['Java']