Vote count: 0
I'm looking at a declaration of a priority queue in C++ but I don't quite understand it.
priority_queue<string, vector<string>,function<bool(string,string)>>
min_heap([] (const string& a,const string& b) {return a.size()>=b.size();});
What is the purpose of the brackets []? Is that part of the function definition?
Also, would I be able to implement the same thing by using a bool operator?
asked 27 secs ago
C++ Priority Queue Declaration
Aucun commentaire:
Enregistrer un commentaire