|
priority_queue::pushpublic member function
void push ( const T& x ); Insert element Inserts a new element in the priority_queue. The content of this new element is initialized to a copy of x.This member function effectively calls the member function push_back of the underlying container object, and then calls the push_heap algorithm to keep the heap property of priority_queues. Parameters
Return valuenoneExample
Output:
ComplexityConstant (in the priority_queue). Although notice that push_heap operates in logarithmic time.See also
|