For min priority queue sir passed vector also . So, what is the work of vector ?
Priority queue STL
Hey @asif_h
priority_queue supports a constructor that requires two extra arguments to make it min-heap.
priority_queue <Type, vector<Type>, ComparisonType > min_heap;
`The third parameter, ‘Comparison Type’ can either be a function or factor (aka function object) that must have bool as return-type and must have 2 arguments.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.