code: public int indexOf(int target) {
      for (int i = start; i < end; i++) {
        if (array[i] == target) {
          return i - start;
        }
      }
      return -1;
    }
docs: Returns the smallest index for which {@link #get} returns {@code target}, or {@code -1} if no
  such index exists. Equivalent to {@code asList().indexOf(target)}.