155. Min Stack

time: O(1)

space:O(n)

use two stack

use one stack

in the last step, the stack will be poped into an empty stack!

Last updated

Was this helpful?