Priority queue: Difference between revisions

Content deleted Content added
Line 362: Line 362:
}</lang>
}</lang>


{{out}}
output:
<pre>
<pre>
5, Make tea
5, Make tea
Line 371: Line 371:
</pre>
</pre>


Alternately, you can use a pre-existing container of yours and use the heap operations to manipulate it:
Alternately, you can use a pre-existing container of yours
and use the heap operations to manipulate it:


<lang cpp>#include <iostream>
<lang cpp>#include <iostream>
Line 404: Line 405:
}</lang>
}</lang>


{{out}}
output:
<pre>
<pre>
5, Make tea
5, Make tea