A queue is a linear data structure that is based on the FIFO (First In First Out) order. Enqueue and dequeue are two of the basic operations that can be performed on a queue along with another set of operations. An enqueue operation will insert a new element at the end of the queue while a dequeue operation removes (pops) and returns the element that has occupied the start (front) of the queue.