2. Dequeue
To dequeue
means to remove or delete elements from the queue. This happens from the front end of the queue. A particular element is removed from a queue after it is done being processed or serviced. We cannot dequeue
an empty queue, and we require at least one element to be present in the queue when we want to dequeue
. The following figure explains the dequeuing of our previous queue.
