18 lines
503 B
Plaintext
18 lines
503 B
Plaintext
{{Data structure}}
|
|
[[File:Fifo.gif|frame|right|Illustration of FIFO behavior]]
|
|
|
|
;Task:
|
|
Create a queue data structure and demonstrate its operations.
|
|
|
|
(For implementations of queues, see the [[FIFO]] task.)
|
|
|
|
|
|
Operations:
|
|
::* push (aka ''enqueue'') - add element
|
|
::* pop (aka ''dequeue'') - pop first element
|
|
::* empty - return truth value when empty
|
|
|
|
<br>
|
|
{{Template:See also lists}}
|
|
<br><br>
|