codeintuition-logo

Understanding the problem


To better understand a queue, let us look at some interesting problems programmers face when designing software systems. Many times in a program, we need to have a data store that is smart enough and remembers the order in which the data was added. A stack is a data structure that can be used where we need to Last In First Out (LIFO) order. However, there are cases when we need to process data in a First In First Out (FIFO) order. This is a fairly common requirement in many use cases, some of which we will look at now.

FIFO or LILO
First In, First Out (FIFO), similar to Last In, Last Out (LILO), is a method of processing data items according to their addition. This means that the first data item added to the data store will be the first to be processed.

Music players

Liking the course? Check our discounted plans to continue learning.