decrement static method

void decrement(
  1. List<int> array,
  2. List<double> errors
)

Implementation

static void decrement(List<int> array, List<double> errors) {
  int index = 0;
  double biggestError = errors[0];
  for (int i = 1; i < array.length; i++) {
    if (errors[i] < biggestError) {
      biggestError = errors[i];
      index = i;
    }
  }
  array[index]--;
}