Getting TLE in Test Case 7

I have use proprity Queue Here

Also after replacing it with set it got accepted
whant to know the reason .

@yaduvanshii092 you can push nodes multiple times in priority queue it will make its size very larges and hence cuase time limit but it set only one occurance will be stored
Coding Blocks IDE
i have changed your code it works file with priority quuee also
if you still have any dout feel free to ask and if clear mark it as solved

1 Like

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.