Queue: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
Line 2: Line 2:


* [[Data Structures#Queue|Data Structures]]
* [[Data Structures#Queue|Data Structures]]
* [[Stack#Overview|Stack]]


=Overview=
=Overview=
Line 7: Line 8:
=Overview=
=Overview=


A '''queue''' is a [[Data_Structures#Dynamic_Set|dynamic set]] in which the the [[Data Structures#DELETE|DELETE]] operation, which does not have any argument, removes the oldest element in the queue. The queue implements the ''first-in-first-out'', or FIFO, policy. Also see [[Stack#Overview|Stack]]. The queue has a '''head''' The INSERT operation for a queue is called ENQUEUE. The DELETE operation is called DEQUEUE. If the queue contains no elements it is said to be empty. If POP() operation is invoked on an empty stack, we say that the stack underflows. If PUSH() operation is called on a full stack, we say that the stack overflows.
A '''queue''' is a [[Data_Structures#Dynamic_Set|dynamic set]] in which the the [[Data Structures#DELETE|DELETE]] operation, which does not have any argument, removes the oldest element in the queue. The queue implements the ''first-in-first-out'', or FIFO, policy. The queue has a '''head''' The INSERT operation for a queue is called ENQUEUE. The DELETE operation is called DEQUEUE. If the queue contains no elements it is said to be empty. If POP() operation is invoked on an empty stack, we say that the stack underflows. If PUSH() operation is called on a full stack, we say that the stack overflows.


<font color=darkgray>Difference between list and queue.</font>
<font color=darkgray>Difference between list and queue.</font>

Revision as of 04:06, 11 August 2018

Internal

Overview

Overview

A queue is a dynamic set in which the the DELETE operation, which does not have any argument, removes the oldest element in the queue. The queue implements the first-in-first-out, or FIFO, policy. The queue has a head The INSERT operation for a queue is called ENQUEUE. The DELETE operation is called DEQUEUE. If the queue contains no elements it is said to be empty. If POP() operation is invoked on an empty stack, we say that the stack underflows. If PUSH() operation is called on a full stack, we say that the stack overflows.

Difference between list and queue.