Lessons
C++ · Ready-made Containers · 40. Priority Queue
step 1 of 7
Biggest on top
A priority_queue always keeps the biggest number on top. The order you push in doesn't matter.
It lives in <queue>, next to the normal queue.
Mission
Push 12 into it, then RUN.
PIP·1
main.cppyour code
1
2
3
4
5
6
7
8
9
10
11
12
13
← press me!
Press RUN to see what this program does.