Priority queue: Difference between revisions

→‎{{header|Quackery}}: Added commentary
(→‎{{header|Quackery}}: Added commentary)
Line 5,209:
 
The task [[Sorting algorithms/Heapsort#Quackery]] implements a priority queue. Here we reuse the words <code>comparison</code>, <code>toheap</code>, and <code>fromheap</code> from that task and adapt them to this task. <code>p</code> in the stack comments denotes a priority queue.
 
(I presume 1 to be the highest priority, and 5 the lowest.)
 
<lang Quackery> [ ' [ 0 peek swap 0 peek > ]
1,484

edits