containsKey(key) {
    return this.nodes_.some((node) => node.getKey() == key);
  }
Whether the heap contains the given key.
@param {K} key The key to check for.
@return {boolean} Whether the heap contains the key.