๐ŸŽ New User? Get 20% off your first purchase with code NEWUSER20 ยท โšก Instant download ยท ๐Ÿ”’ Secure checkout 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

Algorithm
A step-by-step procedure for solving a problem or performing a computation, defined as a finite sequence of instructions.
Garbage Collection
An automatic memory management process that identifies and reclaims memory no longer in use by a program.
Thread
The smallest unit of execution within a process, allowing concurrent operations to run within a single program.
Stack vs Heap
Two memory regions: the stack stores function call data with automatic cleanup, while the heap stores dynamically allocated objects.
API Design
The practice of designing application programming interfaces that are consistent, intuitive, and maintainable for developers to consume.
Race Condition
A bug that occurs when the behavior of software depends on the timing or order of uncontrolled events like thread scheduling.
View All Programming Concepts Terms โ†’