Closed kimmikimmi closed 4 years ago
please tell me how does it work, specially this part below
def push(self, x: int) -> None: self.stack.append(x) if not self.minStack: #list is empty self.minStack.append(x) else: current = min(self.minStack[-1], x) self.minStack.append(current)
can you tell me how does the logic go?
Closes
please tell me how does it work, specially this part below
can you tell me how does the logic go?