Java Solution, 8 ms, Beats 100%
Code\n\nclass Solution {\n    public int waysToSplit(int[] nums) {\n        for (int i = 1; i < nums.length; i++) {\n            nums[i] += nums[i-1];\n        
# Code\n```\nclass Solution {\n    public int waysToSplit(int[] nums) {\n        for (int i = 1; i < nums.length; i++) {\n            nums[i] += nums[i-1];\n        }\n        int ways = 0;\n        for (int i = 0, j = 0, k = 0; i < nums.length - 2 && 3 * nums[i] <= nums[nums.length - 1]; i++) {\n            j = Math.max(j, i + 1);\n            while (j < nums.length - 1 && nums[j] - nums[i] < nums[i]) \n                j++;\n            k = Math.max(k, j);\n            while (k < nums.length - 1 && nums[k] - nums[i] <= nums[nums.length - 1] - nums[k]) \n                k++;\n            ways = (ways + k - j) % 1000000007;\n        }\n        return ways;\n    }\n}\n```
['Array', 'Two Pointers', 'Binary Search', 'Prefix Sum', 'Java']