leetcode: Min Stack solution in constant time