Design a stack that supports push, pop, top, and retrieving the minimum element, all in constant time.
Practise this challenge
All coding challenges