priority queue in cpp
include
using namespace std;
int main() {
priority_queue
pq.push(10);
pq.push(30);
pq.push(20);
while (!pq.empty()) {
cout << pq.top() << " ";
pq.pop();
}
return 0;
}
using namespace std;
int main() {
priority_queue
pq.push(10);
pq.push(30);
pq.push(20);
while (!pq.empty()) {
cout << pq.top() << " ";
pq.pop();
}
return 0;
}