std::priority_queue<ip, vector<ip>, std::greater<int> > pq;
I cannot understand the work of std::greater in the priority queue. I am replacing minheap by the priority queue. this code is taken from geeksForGeeks implementation of Prims algorithm using STL
Aucun commentaire:
Enregistrer un commentaire