Data Structures

Queue

Definition

A First-In-First-Out (FIFO) data structure where elements are added at the back and removed from the front. Used in BFS, task scheduling, and message queues. Common operations: enqueue (add), dequeue (remove), peek (view front).

Code Example

Javascript
Tip: Modify the code above and click “Run” to see the results

Learn More

Related Terms