Solution for MinStack.