FIFO principle
referencebeginnerA queue is First-In-First-Out: the item that has been waiting longest is always the first one served — the exact opposite of a stack's LIFO order.
Remember: FIFO means the first thing enqueued is the first thing dequeued — picture a line of people, not a stack of plates.