Split Array Largest Sum Leetcode Java