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

Code Smell
A surface indication in code that usually corresponds to a deeper problem in the system, suggesting the need for refactoring.
Singleton Pattern
A design pattern that restricts a class to a single instance and provides a global point of access to that instance.
Binary Search
An efficient search algorithm that finds a target value in a sorted array by repeatedly dividing the search interval in half.
Race Condition
A bug that occurs when the behavior of software depends on the timing or order of uncontrolled events like thread scheduling.
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.
Garbage Collection
An automatic memory management process that identifies and reclaims memory no longer in use by a program.
View All Programming Concepts Terms โ†’