Swaps the item at the head of the queue with a new item. The new item will be placed into the correct location in the priority queue.
public void SwapHead(T item)
parameter | description |
---|---|
item | The new item. |
This method is more efficient than calling Dequeue
then Enqueue
.