MinStack
Learn how to implement a special stack that supports standard operations plus getMin() in constant time using an auxiliary stack or encoded values.
Learn how to implement a special stack that supports standard operations plus getMin() in constant time using an auxiliary stack or encoded values.