Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
18
Task/Priority-queue/Delphi/priority-queue.delphi
Normal file
18
Task/Priority-queue/Delphi/priority-queue.delphi
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
program Priority_queue;
|
||||
|
||||
{$APPTYPE CONSOLE}
|
||||
|
||||
uses
|
||||
System.SysUtils, Boost.Generics.Collection;
|
||||
|
||||
var
|
||||
Queue: TPriorityQueue<String>;
|
||||
|
||||
begin
|
||||
Queue := TPriorityQueue<String>.Create(['Clear drains', 'Feed cat',
|
||||
'Make tea', 'Solve RC tasks', 'Tax return'], [3, 4, 5, 1, 2]);
|
||||
|
||||
while not Queue.IsEmpty do
|
||||
with Queue.DequeueEx do
|
||||
Writeln(Priority, ', ', value);
|
||||
end.
|
||||
Loading…
Add table
Add a link
Reference in a new issue