Simple Solution Kadane's and Easy to Understand JAVA 3ms 99.70% faster
\nclass Solution {\n    public int kConcatenationMaxSum(int[] arr, int k) {\n        long maxSum = 0;\n        long curSum = 0;\n        long sum = 0;\n        
```\nclass Solution {\n    public int kConcatenationMaxSum(int[] arr, int k) {\n        long maxSum = 0;\n        long curSum = 0;\n        long sum = 0;\n        for(int i=0; i<arr.length; i++)\n        {\n            sum = (sum+arr[i]);\n            curSum =(curSum+arr[i]);\n            if(maxSum<curSum)\n            {\n                maxSum = curSum;\n            }\n            if(curSum<0){\n                curSum=0;\n            }\n        }\n        if(k==1)\n        return (int) maxSum%1000000007;\n        for(int i=0; i<arr.length; i++)\n        {\n            curSum =(curSum+arr[i]);\n            if(maxSum<curSum)\n            {\n                maxSum = curSum;\n            }\n            if(curSum<0){\n                curSum=0;\n            }\n        }\n        if(sum<0)\n            return (int) maxSum%1000000007;\n        \n        return(int) (maxSum+(long)((k-2)*sum)%1000000007)%1000000007;\n        \n    }\n}\n```\nFind the sum of the array and 1st Kadanes value - maxSum\nIf k==1 return the maxSum\nelse\nFind the 2nd Kadanes value - maxSum by continuing the previoust arr1\'s value\nNow you have Maxsub array vales for 1st two arrays Arr1,ArrK\n\nIf sum <0 negative : Simply return the maxArray(Arr1,ArrK) value because it the value will not increase by adding untill Kth array in negative side.\n\nif sum>0 positive :\nreturn the maxSum(value for Arr1,arrK) + (k-2)(remaining array sums) i.e maxSum+(k-2)*sum\n
[]