I don't understand why using greater makes the minimum element on the top of the priority queue, can anyone explain this in detail?
priority_queue<int, vector<int>, greater<int>> pq;
I don't understand why using greater makes the minimum element on the top of the priority queue, can anyone explain this in detail?
priority_queue<int, vector<int>, greater<int>> pq;