CPP
cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <iostream>
#include <queue>
using namespace std;
void showpq(priority_queue <int, vector<int>, greater<int> > gq)
{
priority_queue <int, vector<int>, greater<int> > g = gq;
while (!g.empty())
{
cout<<"\t"<<g.top();
g.pop();
}
cout << '\n';
}
int main (){
priority_queue <int, vector<int>, greater<int> > gquiz;
gquiz.push(10);
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run