A queue is a linear data structure that follows the FIFO principle
A queue is a simple, linear data structure that follows the First In, First Out (FIFO) principle. This means that the first element added to the queue will be the first one to be removed.
FIFO Principle (First In, First Out):
The first element added to the queue will be the first one to be removed.
Example:
Think of a line at a ticket counter. When a person joins the line, they stand at the back. To be served, the person at the front of the line is attended to first, and others move forward in order.