Java Simple Solution
\nclass Solution {\n    public int waysToSplit(int[] nums) {\n        int size = nums.length;\n        for (int i = 1; i < size; ++i) {\n            nums[i] += 
```\nclass Solution {\n    public int waysToSplit(int[] nums) {\n        int size = nums.length;\n        for (int i = 1; i < size; ++i) {\n            nums[i] += nums[i - 1];\n        }\n        int res = 0;\n        int mod = 1_000_000_007;\n        for (int i = 0; i < size - 2; ++i) {\n            int left = searchLeft(nums, i, size - 1);\n            int right = searchRight(nums, i, size - 1);\n            if (left == -1 || right == -1) {\n                continue;\n            }\n            res = (res + right - left + 1) % mod;\n        }\n        return res;\n    }\n    \n    private int searchLeft(int[] nums, int left, int right) {\n        int pos = -1;\n        int min = nums[left];\n        int lo = left + 1, hi = right - 1;\n        while (lo <= hi) {\n            int mi = lo + (hi - lo) / 2;\n            int mid = nums[mi] - min;\n            int max = nums[right] - nums[mi];\n            if (mid < min) {\n                lo = mi + 1;\n            } else if (max < mid){\n                hi = mi - 1;\n            } else {\n                pos = mi;\n                hi = mi - 1;\n            }\n        }\n        return pos;\n    }\n    \n    private int searchRight(int[] nums, int left, int right) {\n        int pos = -1;\n        int min = nums[left];\n        int lo = left + 1, hi = right - 1;\n        while (lo <= hi) {\n            int mi = lo + (hi - lo) / 2;\n            int mid = nums[mi] - min;\n            int max = nums[right] - nums[mi];\n            if (mid < min) {\n                lo = mi + 1;\n            } else if (max < mid){\n                hi = mi - 1;\n            } else {\n                pos = mi;\n                lo = mi + 1;\n            }\n        }\n        return pos;\n    }\n    \n}\n```
['Java']