classMinStack:def__init__(self):"""
initialize your data structure here.
"""
self.l_list =[]defpush(self, x:int)->None:
self.l_list.append(x)defpop(self)->None:
self.l_list.pop()deftop(self)->int:return self.l_list[-1]defgetMin(self)->int:returnmin(self.l_list)# 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()