MCPcopy
hub / github.com/donnemartin/interactive-coding-challenges / push

Method push

stacks_queues/stack/stack.py:13–14  ·  view source on GitHub ↗
(self, data)

Source from the content-addressed store, hash-verified

11 self.top = top
12
13 def push(self, data):
14 self.top = Node(data, self.top)
15
16 def pop(self):
17 if self.top is None:

Callers 7

test_hanoiMethod · 0.95
test_end_to_endMethod · 0.95
test_stack_minMethod · 0.80
test_set_of_stacksMethod · 0.80
get_sorted_stackMethod · 0.80
test_push_on_fullMethod · 0.80
test_stacksMethod · 0.80

Calls 1

NodeClass · 0.70

Tested by 7

test_hanoiMethod · 0.76
test_end_to_endMethod · 0.76
test_stack_minMethod · 0.64
test_set_of_stacksMethod · 0.64
get_sorted_stackMethod · 0.64
test_push_on_fullMethod · 0.64
test_stacksMethod · 0.64