Concept Flow - Min Stack Design
Push value
Compare with current min
If smaller or equal, push to min stack
Push to main stack
Pop value
Check if popped value == min stack top
If yes, pop min stack
Get min
Return top of min stack
This flow shows how each push compares with the current minimum and updates a min stack to track minimums, and how pop keeps both stacks in sync.