2016 Update
This commit is contained in:
parent
948b86eafa
commit
dcf5d15da3
7965 changed files with 139854 additions and 31002 deletions
|
|
@ -1,16 +1,25 @@
|
|||
{{Data structure}}
|
||||
[[File:Fifo.gif|frame|right|Illustration of FIFO behavior]]
|
||||
|
||||
;Task:
|
||||
Implement a FIFO queue.
|
||||
|
||||
Elements are added at one side and popped from the other in the order of insertion.
|
||||
|
||||
|
||||
Operations:
|
||||
* push (aka ''enqueue'') - add element
|
||||
* pop (aka ''dequeue'') - pop first element
|
||||
* empty - return truth value when empty
|
||||
* push (aka ''enqueue'') - add element
|
||||
* pop (aka ''dequeue'') - pop first element
|
||||
* empty - return truth value when empty
|
||||
|
||||
|
||||
Errors:
|
||||
* handle the error of trying to pop from an empty queue (behavior depends on the language and platform)
|
||||
* handle the error of trying to pop from an empty queue (behavior depends on the language and platform)
|
||||
|
||||
|
||||
;See:
|
||||
* [[Queue/Usage]] for the built-in FIFO or queue of your language or standard library.
|
||||
|
||||
See [[Queue/Usage]] for the built-in FIFO or queue of your language or standard library.
|
||||
|
||||
{{Template:See also lists}}
|
||||
<br><br>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue