Min stack

0
Remix

Design a stack that supports push, pop, top and returning the current minimum element, each in constant time. Explain how the minimum stays correct after pops, how you handle duplicate minimum values, and the extra memory your design uses.

AnthropicTechnical phone screenLast asked Feb 2026
No answer yet. Write the first one; the best answer gets endorsed.