Design a stack that returns the minimum element in O(1) — without sorting. Uses a clever auxiliary stack to track minimums at every level.
Step through to reveal explanations.