pqueue_dequeue implementation correctness confirmed.