Suggest an editImprove this articleRefine the answer for “What principle underlies how a queue works?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)The queue's operation is based on the **FIFO (First In, First Out)** principle: elements are added to the end and removed from the front, so the processing order exactly matches the order of arrival. **Key point:** a queue models the natural order of waiting, like a line of people at a checkout.Shown above the full answer for quick recall.Answer (EN)ImageThe queue's operation is based on the **FIFO (First In, First Out)** principle: *first in, first out*. This means: - elements are added **to the end** of the queue, - they are removed **from the front**, - the processing order exactly matches the order of arrival. Example: if you add `1`, `2`, `3` to a queue one after another, they come out in the same order when removed: `1`, `2`, `3`. In this way, a queue models the **natural order of waiting**: like a line of people at a checkout.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.