code: private static int lastIndexOf(float[] array, float target, int start, int end) {
      for (int i = end - 1; i >= start; i--) {
        if (array[i] == target) {
          return i;
        }
      }
      return -1;
    }
docs: TODO(kevinb): consider making this public