Implement Queue using Stacks
Asked at Microsoft · Coding Questions · Difficulty: Easy
Implement a first-in-first-out (FIFO) queue using only two stacks. The queue must support the usual queue operations: push, pop, peek, and empty.
Loading the problem…
More Microsoft interview questions
- LLM conceptual questions
- Roofline Analysis and Mixed-Precision Gradients for Matmul
- Tiny Next-Token Prediction Model (PyTorch Fill-In)
- DNA Shotgun Sequencing: Chain and Eulerian Path Reconstruction
- Design Search Autocomplete / Typeahead
- Design a Chatbot Personalization / Memory System