queues another special type of list is the queue data structure this data structure is no different from the regular queue you are accustomed to in real life if you have stood in line at an airport or to be served your favorite burger at your neighborhood shopthen you should know how things work in queue queues are also very fundamental and important concept to grasp since many other data structures are built on them the way queue works is that the first person to join the queue usually gets served firstall things being equal the acronym fifo best explains this fifo stands for first infirst out when people are standing in queue waiting for their turn to be servedservice is only rendered at the front of the queue the only time people exit the queue is when they have been servedwhich only occurs at the very front of the queue by strict definitionit is illegal for people to join the queue at the front where people are being servedto join the queueparticipants must first move behind the last person in the queue the length of the queue does not matter this is the only legal or permitted way by which the queue accepts new entrants as human as we arethe queues that we form do not conform to strict rules it may have people who are already in the queue deciding to fall out or even have others substituting for them it is not our intent to model all the dynamics that happen in real queue abstracting what queue is and how it behaves enables us to solve plethora of challengesespecially in computing we shall provide various implementations of queue but all will revolve around the same idea of fifo we shall call the operation to add an element to the queue enqueue to remove an element from the queuewe will create dequeue operation anytime an element is enqueuedthe length or size of the queue increases by one converselydequeuing items reduce the number of elements in the queue by one