About nodes in the priority queue

when more than 1 edge will have same weight then which of them will be popped first from the min heap ? I mean will the comparison between them be then made based on the value of the node?

hello @Senjuti256

yeah first the comparision will be done on the basis of first value of pair.

if it is same then comparision will be done on the basis of second value of pair.

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.