🎁 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

Stack
A data structure that follows Last-In-First-Out (LIFO) ordering, where elements are added and removed from the same end (top).
Memoization
An optimization technique that caches function results for given inputs, avoiding redundant computations for repeated calls.
Version Control
A system that records changes to files over time, allowing you to recall specific versions, collaborate, and track history.
Refactoring
Restructuring existing code without changing its external behavior to improve readability, maintainability, and performance.
Regex (Regular Expression)
A sequence of characters that defines a search pattern, used for string matching, validation, and text manipulation.
Concurrency
The ability of a program to manage multiple tasks that can make progress during overlapping time periods.
View All Programming Concepts Terms →