September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
13
Task/Priority-queue/Zkl/priority-queue-2.zkl
Normal file
13
Task/Priority-queue/Zkl/priority-queue-2.zkl
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
pq:=PQ();
|
||||
foreach x in
|
||||
(T("Clear drains",3, "Feed cat",4, "Make tea",5, "Solve RC tasks",1, "Tax return",2,
|
||||
"Clean room",10,"Wash cat",10)){
|
||||
pq.add(x,__xWalker.next())
|
||||
}
|
||||
pq.println();
|
||||
println("Number 1 thing to do: ",pq.peek());
|
||||
println("Top 2 things to do: ",pq.walker().walk(2));
|
||||
println("Do this next year: ",pq.walker().walk()[-1]);
|
||||
println("ToDo list:");
|
||||
foreach item in (pq){ item.println() }
|
||||
pq.println();
|
||||
Loading…
Add table
Add a link
Reference in a new issue