MCPcopy Create free account
hub / github.com/careercup/ctci / stacktop

Method stacktop

python/Chapter 3/Question3_1/Q3_1.py:36–37  ·  view source on GitHub ↗
(self, stacknum)

Source from the content-addressed store, hash-verified

34 return self.pointer[stacknum] == -1
35
36 def stacktop(self, stacknum):
37 return self.stacksize * stacknum + self.pointer[stacknum]
38
39
40

Callers 3

pushMethod · 0.95
popMethod · 0.95
peekMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected