Use binary search to find the delete key.
182211
private int binaryFindDelete(
    int              lower,
    int              upper,
    Object           delKey)
  {
    java.util.Comparator comp = insertComparator();
    int xcc;                       /* Current compare result                */
    int i;
    int idx = -1;                  /* Returned index (-1 if not found)      */
    while (lower <= upper)         /* Until they cross                      */
    {
      i = (lower + upper) >>> 1;   /* Mid-point of current range            */
      xcc = comp.compare(delKey, _nodeKey[i]);
      if (xcc < 0)                 /* SEARCH_KEY < NODE_KEY                 */
        upper = i - 1;             /* Discard upper half of range           */
      else                         /* SEARCH_KEY >= NODE_KEY                */
        {
          if (xcc > 0)             /* SEARCH_KEY > NODE_KEY                 */
            lower = i + 1;         /* Discard lower half of range           */
          else                     /* SEARCH_KEY FOUND                      */
            {
              idx = i;             /* Remember the index                    */
              break;               /* We're done                            */
            }
        }
    }
    return idx;
  }
992144
def delete_key(self):
        """"""
        print("This command will delete an API key.")
        apiKeyID = input("API Key ID: ")
        try:
            self._curl_bitmex("/apiKey/",
                              postdict={"apiKeyID": apiKeyID}, verb='DELETE')
            print("Key with ID %s disabled." % apiKeyID)
        except:
            print("Unable to delete key, please try again.")
            self.delete_key()
933069
public void delete(Key key) {
    // This is probably a serious overestimation, but I can't see a good
    // way to find the size in the public API.
    int bytesHere = KeyFactory.keyToString(key).length();

    // Do this before the add so that we guarantee that size is never > sizeLimit
    if (deletesBytes + bytesHere >= params.getBytesLimit()) {
      flushDeletes();
    }

    deletesBytes += bytesHere;
    deletes.add(key);

    if (deletes.size() >= params.getCountLimit()) {
      flushDeletes();
    }
  }
531880
private int sequentialFindDelete(
    int              lower,
    int              upper,
    Object           delKey)
  {
    java.util.Comparator comp = deleteComparator();
    int xcc;                       /* Current compare result                */
    int idx = -1;                  /* The returned index (-1 if not found)  */
    for (int i = lower; i <= upper; i++)
    {
      xcc = comp.compare(delKey, _nodeKey[i]);
      if (xcc == 0)                /* Found a match                         */
        {
          idx = i;                 /* Remember current point                */
          break;
        }
    }
    return idx;
  }
5202
def delete_item(key):
    """"""
    CACHED_KEY_FILE = os.path.join(CURRENT_DIR, key)

    if os.path.isfile(CACHED_KEY_FILE):
        os.remove(CACHED_KEY_FILE)
459219
def delete(key)
      raise ArgumentError, "key must be string" unless key.instance_of?(String)
      raise ArgumentError, "max key size is 32" if key.size > 32

      @root_node = delete_and_delete_storage(
        @root_node,
        NibbleKey.from_string(key)
      )

      update_root_hash
    end
1137329
def depersist(self, key):
        
        self.connection.retry(self.connection.delete, self.__path_of(key))
        self.__increment_last_updated()
541403
def delete(key)
      hashed_key = hash_key(key)
      unless (entry = @btree.get(hashed_key))
        return nil
      end

      if entry.is_a?(PEROBS::Array)
        entry.each_with_index do |ae, i|
          if ae.key == key
            self.entry_counter -= 1
            return entry.delete_at(i).value
          end
        end
      else
        return entry.value if entry.key == key
      end

      nil
    end
1069951
public int removeAndGet(final int key) {

        final int hash  = hashOf(key);
        int index = hash & mask;
        if (contains(key, index)) {
            return doRemove(index);
        }

        if (states[index] == FREE) {
            return missingEntries;
        }

        int j = index;
        for (int perturb = perturb(hash); states[index] != FREE; perturb >>= PERTURB_SHIFT) {
            j = probe(perturb, j);
            index = j & mask;
            if (contains(key, index)) {
                return doRemove(index);
            }
        }

        return missingEntries;
    }
921897
private static int binarySearch(int[] a, int start, int end, int key) {
        int lo = start, hi = end-1; // search range is [lo,hi]

        // invariant lo<=hi
        while (lo <= hi) {
            int pivot = (lo + hi)/2;
            int v = a[pivot];

            if (v < key)        // needs to search upper half
                lo = pivot+1;
            else if (v > key)   // needs to search lower half
                hi = pivot-1;
            else    // eureka!
                return pivot;
        }
        return -(lo + 1); // insertion point
    }
598194
def delete(self, key):
        """"""
        self._get_table()
        self.table.delete_item(key=key)
        log.debug("Deleted item at key '%s'" % (key))
1156986
@Nullable
  public synchronized V remove(K key) {
      V oldValue = mMap.remove(key);
      mSizeInBytes -= getValueSizeInBytes(oldValue);
      return oldValue;
  }
1257699
def delete(key)
      file = filename key
      File.delete file if File.exist? file
    end
1064737
def delete(self, key: bytes) -> Tuple[Hash32]:
        
        validate_is_bytes(key)
        validate_length(key, self._key_size)

        return self.set(key, self._default)
306649
def process_delete(self, obj, pk_set=None, action=None, update_fields=None, **kwargs):
        """"""
        build_kwargs = self.delete_cache.take(obj)

        if build_kwargs:
            self.index.build(**build_kwargs)
161151
def delete_subtrie(self, key):
        
        validate_is_bytes(key)

        self.root_hash = self._set(
            self.root_hash,
            encode_to_bin(key),
            value=b'',
            if_delete_subtrie=True,
        )
1160287
def delete(self, key):
        
        self._dstore.delete(key)
        self.cache.delete(key)