did the same things as video on priority queue-functors
Compilation error
code in link above
template argument 3 is invalid
priority_queue<hostel,vector<hostel>,distance> pq;
What are you trying to do here?
You can simply maintain a priority queue with int as your distance. Insert and pop distances as you want.
solved the question using the method you told me but i was trying to use functors for practice as done in video on priority queue-functors video