Available question text
Implement a FIFO queue using only stack operations (push, pop/peek, size/isEmpty) by composing two stacks to support push, pop, peek, and empty. Aim for an amortized O(1) solution by lazily transferring elements between the two stacks.
Related questions
Continue with questions that share topics or the same question type.
- Convert Sampled Call Stacks into Start and End Events
Coding · Arrays & Strings · Stacks & Queues
- Count Monotonic Stacks
Coding
- Design a Deque (Double-Ended Queue)
Coding
- Design Bounded Blocking Queue
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 232. Implement Queue using Stacks
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source