Min Stack
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.
Min Stack

Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.

Example 1:
Input: {"commands":["MinStack","push","push","push","getMin","pop","top","getMin"],"values":[[],[-2],[0],[-3],[],[],[],[]]}
Output: [null,null,null,null,-3,null,0,-2]
Input
arr ={"commands":["MinStack","push","push","push","getMin","pop","top","getMin"],"values":[[],[-2],[0],[-3],[],[],[],[]]}

Init stacks

Op:

init
Main Stack
Min Stack
Variables
No variables to display
DepthFunction Call
Stack empty
0/7