⇵
Stack & Queue
AP CSA · Unit 10: Recursion & Data Structures
↺ Reset
⛶ Fullscreen
Stack (LIFO)
Queue (FIFO)
Stack Size
0
Stack Top
—
Queue Size
0
Queue Front
—
Operations
0
Value
Stack Operations
Push ↓
Pop ↑
Peek
Queue Operations
Enqueue →
Dequeue ←
Peek
Quick Fill
Fill 5 items
Clear Both
Operation Log
Quick Quiz
▼
1. If you push 1, 2, 3 onto a stack and pop once, you get:
1
2
3
Error
2. If you enqueue A, B, C and dequeue once, you get:
A
B
C
Error
3. Both push and enqueue are:
O(n)
O(1)
O(log n)
O(n²)
Check Answers