Suggest an editImprove this articleRefine the answer for “What is a queue?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)**A queue** is a data structure that works on the **FIFO (First In, First Out)** principle: the element added first is removed before the others. **Key point:** queues are commonly used for task scheduling, network packet processing, breadth-first graph traversal (BFS), and asynchronous message systems.Shown above the full answer for quick recall.Answer (EN)Image**A queue** is a data structure that works on the **FIFO (First In, First Out)** principle: *first in, first out*. That means the element added first is removed before the others. Main queue operations: - **enqueue(x)** - add element `x` to the end of the queue, - **dequeue()** - remove and return the element from the front of the queue, - **peek() / front()** - look at the element at the front without removing it, - **isEmpty()** - check whether the queue is empty. Example: a line of people in a store - whoever got there first is served first. A queue is often used: - for task scheduling (processes, threads, printers), - in networking (packet processing), - for breadth-first graph traversal (**BFS**), - in asynchronous systems (message queues, event queues).For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.