title: Removing tail element of priority queue
body: <p>How can I remove the tail element of a priority queue? I am trying to implement beam search using a priority queue and once the priority queue is full, I want to remove the last element(the element with the least priority).</p>
  
  <p>Thanks!</p>