← Microsoft questions

Implement queue using single and two stacks

Filed under Microsoft

Implement a First-In-First-Out (FIFO) queue using stacks. Specifically, implement it using two stacks, and discuss or implement the single-stack recursive approach.

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 Microsoft questions

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