Double-Ended Queue (Deque) Visualization
Operations allowed at both ends - Add/Remove from Front and Rear
Deque Structure
Deque is empty. Add elements from front or rear!
Deque Properties
Size: 0
Front: null
Rear: null
Is Empty: Yes
Time Complexities
Add Front/Rear: O(1)
Remove Front/Rear: O(1)
Peek Front/Rear: O(1)
Space: O(n)
Operations Summary
Add Front
Insert at beginning
Add Rear
Insert at end
Remove Front
Delete from beginning
Remove Rear
Delete from end
Real-world Applications
🖥️ Undo/Redo
Text editor operations
🌐 Browser History
Navigate back/forward
🎮 Game States
Save/load game states
🔄 Sliding Window
Algorithm applications