🎁 New User? Get 20% off your first purchase with code NEWUSER20 Register Now →
Menu

Categories

Programming Concepts Beginner

What is Queue?

A data structure that follows First-In-First-Out (FIFO) ordering, where elements are added at the rear and removed from the front.

Queues model real-world waiting lines. Enqueue adds to the back, dequeue removes from the front. Implementations include array-based (circular buffer) and linked-list-based queues. Priority queues dequeue by priority rather than insertion order.

Queues are used in breadth-first search, task scheduling, print spooling, request handling (web servers), and message queues (RabbitMQ, SQS). Double-ended queues (deques) allow insertion and removal at both ends.

Related Terms

Closure
A function that captures and retains access to variables from its enclosing scope, even after that scope has finished executing.
Composition over Inheritance
A design principle favoring object composition (has-a relationships) over class inheritance (is-a relationships) for code reuse.
Linked List
A linear data structure where elements are stored in nodes, each containing data and a pointer to the next node in the sequence.
Data Structure
A way of organizing and storing data in a computer so it can be accessed and modified efficiently.
Concurrency
The ability of a program to manage multiple tasks that can make progress during overlapping time periods.
Algorithm
A step-by-step procedure for solving a problem or performing a computation, defined as a finite sequence of instructions.
View All Programming Concepts Terms →