mercredi 4 octobre 2017

Can someone explain how std::greater is used to implement priority_queue

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