Please explain me

I don’t explain priority_queue how we are using them to get min heap
HERE IS MY CODE OF ROPE PROBLEM

hi @hhiteshbansal_40d12e2460a1738e
updated code -->

okay but i don’t understand how we are using priority_queue ended up giving me min heap

priority_queue<int, vector, greater > pq;
defining priority queue like this itself means min heap…

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.