max pq c++ code example
Example 1: min heap in c++
priority_queue <int, vector<int>, greater<int>> minHeap;
Example 2: min heap priority queue c++
#include<queue>
std::priority_queue <int, std::vector<int>, std::greater<int> > minHeap;
priority_queue <int, vector<int>, greater<int>> minHeap;
#include<queue>
std::priority_queue <int, std::vector<int>, std::greater<int> > minHeap;