package leetcode;

/**
 * https://leetcode.com/problems/k-concatenation-maximum-sum/
 */
public class Problem1191 {
    public int kConcatenationMaxSum(int[] arr, int k) {
        // TODO
        return 0;
    }

    public static void main(String[] args) {
        Problem1191 prob = new Problem1191();
        System.out.println(prob.kConcatenationMaxSum(new int[]{1,2}, 3)); // 9
        System.out.println(prob.kConcatenationMaxSum(new int[]{1,-2,1}, 5)); // 2
        System.out.println(prob.kConcatenationMaxSum(new int[]{-1,-2}, 7)); // 0
    }
}

@@ -539,16 +539,183 @@
 ); // 0%0A
+        System.out.println(prob.kConcatenationMaxSum(new int%5B%5D%7B1,2,-3%7D, 3)); // 3%0A        System.out.println(prob.kConcatenationMaxSum(new int%5B%5D%7B1,2,-3,4%7D, 3)); // 12%0A
     %7D%0A%7D%0A

Update problem 1191