not able to to understand line no 8
priority queue<int,…> pq ropes,ropes+n
At 7:40 time not able to understand the code
@dipeshpandey2001
when you use a priority queur for the getting the max element on the top you use priority_queue q;
but when you need the samllest element on the top we use
priority_queue<int,vector,greater> q;
vector is the container for storing the elements and greater is the comparator
if your issue still exists let me know and if clear mark it as resolved and rate my experience
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.