MCPcopy Create free account
hub / github.com/baowenbo/DAIN / peak

Method peak

Stack.py:12–16  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

10 def push(self,val):
11 return self.stack.append(val)
12 def peak(self):
13 if self.is_empty():
14 return None
15 else:
16 return self.stack[-1]
17 def size(self):
18 return len(self.stack)
19 def is_empty(self):

Callers

nothing calls this directly

Calls 1

is_emptyMethod · 0.95

Tested by

no test coverage detected