Introduction to Queue
What is a Queue?
A Queue is a linear data structure that follows the FIFO (First-In, First-Out) principle. The element inserted first is the first one to be removed.

- Front: The first element of the queue (to be removed first).
- Rear: The last element of the queue (where new elements are added).
Real-life analogy: Think of a queue as a line of people waiting for a bus. The person who gets in line first is the first to board the bus.
Queue vs Stack: Queue is FIFO (First-In, First-Out), Stack is LIFO (Last-In, First-Out).