code: public void pop(int element) {
      assert this.contains(element);
      int i = this.pos.get(element);
      this.pos.set(element, -1);
      int last = this.heap.back();
      this.heap.pop();
      int j = this.heap.size();
      if (i == j)
        return;
      assert i < j;
      this.pos.set(last, i);
      this.heap.set(i, last);
      this.up(last);
      this.down(last);
    }
docs: Removes a given element from the priority queue.  Its priority is kept as is.
  @param element the element