← Questions
Min stack
0
I was asked this
No reports yet. Sign in to say where you were asked it.
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.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Write and test your solution herePython in your browser, the question's tests level by level, saved for you.Sign in to start coding
