SyntaxFix
Write A Post
Hire A Developer
Questions
The third template parameter for priority_queue is the comparator. Set it to use greater.
priority_queue
greater
e.g.
std::priority_queue<int, std::vector<int>, std::greater<int> > max_queue;
You'll need #include <functional> for std::greater.
#include <functional>
std::greater