JAVA || 2ms || 100% Beat ||  Easy to Understand for Beginners🙌
IntuitionApproachComplexity

Time complexity:o(n)


Space complexity:o(1)

Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach 
    prefix sum, suffix sum

# Complexity
- Time complexity:o(n)

- Space complexity:o(1)

# Code
```java []
class Solution {
    public int waysToSplitArray(int[] nums) {
        long total_sum=0;
        for(int i=0;i<nums.length;++i){
            total_sum+=nums[i];
        }
        long sum_order=0;
        int result=0;
        for(int i=0;i<nums.length-1;++i){
             sum_order+=nums[i];             
             if(sum_order>=(total_sum-sum_order))result++;
        }
        return result;
        
    }
}
```
['Array', 'Prefix Sum', 'Java']