Queue.md (632B)
1 # Queue 2 3 CS202 L14 / CS303 Ch 1 4 5 **Definition:** This is a datatype that works on a first in first out basis. This is often implemented using a [SinglyLinkedList](SinglyLinkedList.md) with a link to the tail (where more nodes would be added). This is also often implemented such that you add to the end and remove from the start. 6 7 enqueue: add to queue 8 9 dequeue: remove from queue 10 11 peek: view the front element 12 13 It is important to note, generally, people implement these to add to the back and remove from the start although either direction is functionally equivalent. See [Stack](Stack.md) for information about a lifo approach.