← Adobe questions
CodingReported in a candidate post, Jul 2025

Implement a queue using two stacks

Filed under Adobe · Also reported at Accolite, Google, TCS, Wells Fargo

Implement a FIFO queue using only two stacks. Support push(x), pop() and peek(), and report whether the queue is empty. Aim for amortised O(1) per operation.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Adobe questions

Collected from public candidate posts and coding forums. Updated Nov 2026.