MCPcopy Create free account
hub / github.com/acm-clan/algorithm-stone / push

Method push

animations/src/algo_stack.py:21–27  ·  view source on GitHub ↗
(self, data)

Source from the content-addressed store, hash-verified

19 self.arrange()
20
21 def push(self, data):
22 n = AlgoNode(str(data))
23 self.add(n)
24 self.datas.append(data)
25 self.nodes.append(n)
26 self.arrange()
27 print("stack push size:", len(self.datas))
28
29 def pop(self):
30 p = self.nodes[-1]

Callers 1

constructMethod · 0.95

Calls 3

AlgoNodeClass · 0.85
printFunction · 0.85
addMethod · 0.45

Tested by

no test coverage detected