标签:result instant leetcode def 用户 struct ini class init
class MinStack(object): def __init__(self): """ initialize your data structure here. """ self._elem=[] def push(self, x): """ :type x: int :rtype: None """ self._elem.append(x) def pop(self): """ :rtype: None """ return self._elem.pop() def top(self): """ :rtype: int """ return self._elem[-1] def getMin(self): """ :rtype: int """ return min(self._elem) # Your MinStack object will be instantiated and called as such: # obj = MinStack() # obj.push(x) # obj.pop() # param_3 = obj.top() # param_4 = obj.getMin()
标签:result instant leetcode def 用户 struct ini class init
原文地址:https://www.cnblogs.com/taoyuxin/p/11782407.html