|
require "queue"
|
|
|
|
local tasks = new pqueue()
|
|
tasks:push(3, "Clear drains")
|
|
tasks:push(4, "Feed cat")
|
|
tasks:push(5, "Make tea")
|
|
tasks:push(1, "Solve RC tasks")
|
|
tasks:push(2, "Tax return")
|
|
while !tasks:empty() do
|
|
local [p, v] = tasks:pop()
|
|
print($"{p} {v}")
|
|
end
|