max heap c++ code code example
Example 1: min heap in c++
priority_queue <int, vector<int>, greater<int>> minHeap;
Example 2: max heap in c++
priority_queue <int> maxHeap;
priority_queue <int, vector<int>, greater<int>> minHeap;
priority_queue <int> maxHeap;