commented print statements

This commit is contained in:
Jacob Delgado 2023-09-26 21:16:21 -07:00
parent 85db2d73d0
commit febbbd72d3

View File

@ -8,22 +8,22 @@ class MinStack(object):
else: else:
mn = min(self.stack[-1][1], val) mn = min(self.stack[-1][1], val)
self.stack.append((val, mn)) self.stack.append((val, mn))
print(self.stack) # print(self.stack)
def pop(self): def pop(self):
if self.stack: if self.stack:
print(self.stack) # print(self.stack)
self.stack.pop() self.stack.pop()
def top(self): def top(self):
if self.stack: if self.stack:
print(self.stack) # print(self.stack)
return self.stack[-1][0] return self.stack[-1][0]
return 0 return 0
def getMin(self): def getMin(self):
if self.stack: if self.stack:
print(self.stack) # print(self.stack)
return self.stack[-1][1] return self.stack[-1][1]
return 0 return 0