Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
12
Task/Priority-queue/Nim/priority-queue-2.nim
Normal file
12
Task/Priority-queue/Nim/priority-queue-2.nim
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import HeapQueue
|
||||
|
||||
var pq = newHeapQueue[(int, string)]()
|
||||
|
||||
pq.push((3, "Clear drains"))
|
||||
pq.push((4, "Feed cat"))
|
||||
pq.push((5, "Make tea"))
|
||||
pq.push((1, "Solve RC tasks"))
|
||||
pq.push((2, "Tax return"))
|
||||
|
||||
while pq.len() > 0:
|
||||
echo pq.pop()
|
||||
Loading…
Add table
Add a link
Reference in a new issue