code: public E removeFirst() {
      E first = getFirst();
      swap(0, size - 1);
      size--;
      elements.remove(size);
      heapifyDown(0);
      return first;
    }
docs: Returns the highest-priority element and removes it from the queue.