Sir, in line 39, why do we give vector as the 2nd parameter??
Doubt in line 39
hi @bsajid173_e31b04ed7ba6514f
if we just write
priority_queue<Person>
then it acts as a max heap…
but,
priority_queue<Person, vector<Person>, PersonCompare>
this makes 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.