Optimal Algorithmic Approach
Dual-stack: main stack + auxiliary min stack that only grows when a new minimum is pushed.
Core Invariants & Edge Cases
- Maintain a secondary 'min stack' that tracks minimums
- Push to min stack when new element ≤ current min; pop synchronously
- Alternatively encode the delta from current min in a single stack