Concept Flow - Min Stack Design
Push value
Compare with current min
Push to main stack
Pop value
Check if popped equals min stack top
GetMin
Return top of min stack
The Min Stack keeps track of the minimum value at each push by using a second stack. When pushing, it updates the min stack if needed. When popping, it also pops from the min stack if the popped value is the current minimum.
