docs: private int getKeyIndex(int key) {
      reindexItems();
  
      int index = Arrays.binarySearch(sortedKeys, key);
      if (index >= 0) {
        int prevIndex = index - 1;
        while (prevIndex >= 0 && sortedKeys[prevIndex] == key) {
          index = prevIndex;
          prevIndex = index - 1;
        }
        return index;
      } else {
        return -1;
      }
    }