Priority queue: Difference between revisions

Content deleted Content added
→‎{{header|Quackery}}: Added commentary
Line 5,209: 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.
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 > ]
<lang Quackery> [ ' [ 0 peek swap 0 peek > ]