RosettaCodeData/Task/Priority-queue/11l/priority-queue.11l

5 lines
197 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
V items = [(3, Clear drains), (4, Feed cat), (5, Make tea), (1, Solve RC tasks), (2, Tax return)]
minheap:heapify(&items)
L !items.empty
print(minheap:pop(&items))