Simple Python Solution || Prefix Sum || O(n)
if it's help, please up ⬆ vote! ❤️Complexity
Time complexity: O(n)

Space complexity: O(n)
Code
# if it's help, please up ⬆ vote! ❤️


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

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

# Code
```python3 []
class Solution:
    def waysToSplitArray(self, nums: List[int]) -> int:
        pref = [0]
        for val in nums:
            pref.append(pref[-1] + val)

        ans, n = 0, len(nums)
        for i in range(1, n):
            if pref[i] >= pref[-1] - pref[i]:
                ans += 1
        return ans
```
['Array', 'Hash Table', 'Math', 'Prefix Sum', 'Python', 'Python3']