beginner friendly solution beats 99.9% user in JAVA
IntuitionApproachComplexity
Time complexity: O(n)

Space complexity: O(1)
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

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

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

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

# Code
```java []
class Solution {
    public int waysToSplitArray(int[] nums) {
        long left=0;
        long right=0;
        for(int num: nums){
            right= right+num;
        }
        int count=0;
        for(int i=0;i<nums.length-1;i++){
            left= left + nums[i];
            right= right - nums[i];
            if(left>=right)count++;
        }
        return count;
    }
}
```
['Java']