commented print statements
This commit is contained in:
parent
85db2d73d0
commit
febbbd72d3
@ -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
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user