These are part of my notes for the Coursera course: Algorithms, Pt I (Princeton).
##Queue
####Concept
- one of the fundamental data types used to manage a collection of objects
- works like a 'queue' of people
- people enter from the back of the queue and leave from the front
- new items are
enqueued
on to the back of the queue - items are
dequeued
from the front of the queue - this management method known as a First In, First Out (FIFO)
####Implementation
- there is more than one way to accomplish this behaviour
- both
linked lists
andarrays
are two fundamental ways to store the data - the rest of the data type then determines when and how the array/linked list is accessed
- this is what determines the stack's behaviour
- both
####Notes
- the order in which items are taken out will always match the order in which they were added
####See Also