Hostel Visit Problem

CODE : https://ide.codingblocks.com/s/659381

Query: Only 1 test case is passing

Approach: Only stores top k shortest paths. If size of priority queue is greater than k and data<top element of heap than I will pop the bigger one and pushes the samller one

hi @rahul_bansal, code is correct just use long long

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.