Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/careercup/ctci
/ push
Method
push
python/Chapter 3/Question3_2/ChapQ3.2.py:28–31 ·
view source on GitHub ↗
(self, value)
Source
from the content-addressed store, hash-verified
26
self.min = []
27
28
def
push(self, value):
29
self.stack.append(value)
30
if
len(self.min) == 0 or value <= self.min[-1]:
31
self.min.append(value)
32
33
def
pop(self):
34
if
len(self.stack) == 0:
Callers
nothing calls this directly
Calls
1
append
Method · 0.80
Tested by
no test coverage detected