Increases the capacity of the priority queue, if necessary.
Increases the capacity of the priority queue, if necessary.This function ensures that the priority queue can hold at least the number of elements specified by the minimum capacity argument.
If the capacity is actually increased, this function has a memory and time complexity of O(N), with N being the new capacity of the queue.