๐ŸŽ 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

Big O Notation
A mathematical notation that describes the worst-case performance of an algorithm as input size grows.
Unit Testing
Testing individual components or functions of a program in isolation to verify they work correctly.
Concurrency
The ability of a program to manage multiple tasks that can make progress during overlapping time periods.
DRY (Don't Repeat Yourself)
A software development principle that aims to reduce code duplication by abstracting common patterns into reusable components.
Algorithm
A step-by-step procedure for solving a problem or performing a computation, defined as a finite sequence of instructions.
Code Smell
A surface indication in code that usually corresponds to a deeper problem in the system, suggesting the need for refactoring.
View All Programming Concepts Terms โ†’