DSA
beginner
Queue Data Structure
Understand the First-In-First-Out (FIFO) principle. Visualize Enqueue and Dequeue operations.
Queue (FIFO)
O(1) ops
Ready
Queue Structure
Ready to perform queue operations
FRONT →
Empty Queue
← REAR
Queue (FIFO)
Size: 0/8 | Front: null | Rear: null
FIFO Principle
Add at REARProcess in orderRemove from FRONT
Queue Element
Front Element
Rear Element
Size
0
Front
null
Rear
null
Capacity
8
Stack or queue?
Sort
Sort each system by the structure that fits it.
Tap a piece, then tap where it goes — or drag it. Tap the tray to take one back.
Stack (LIFO)
Drop items hereQueue (FIFO)
Drop items here6 pieces left to place
Test your knowledge
21 questions
Question 1 of 21
Score: 0
Which data structure is best for Breadth-First Search (BFS)?
When to reach for this
- Breadth-First Search (BFS)
- Processing items in the order they arrived
- Sliding Window problems (sometimes used)
- Buffer management
Interview Questions
Microsoft
Bloomberg
Valve (not FAANG but fun)
Facebook
Amazon
Google
Amazon
Microsoft
Facebook
Apple
Bloomberg
Love this visualization?
Sign up to track your progress, earn achievements, use the AI assistant, and access your personal learning dashboard.
100% free • No credit card required