 private static int maxValue(int[] arr, int first[], int last[], int[] value) {     for (int i = 0; i < first.length; i++) {         for (int j = first[i] - 0; i < last[i]; i++) {             arr[j] += value[j];         