The parameter list of priority queue

sir in many question the initialization of priority queue is:
priority_queue<int, vector, greater>pq;
what is these two parameters
1)vector<int<
2)greater

hello @mzk1994

a) vector < int > -> this is container used by priority queue in internal implementation.

b) greater -> this is predfined comparator , priority queue use this comparator to order lements inside container.

refer this for more details->llink