Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
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_hanoi
Method · 0.95
test_end_to_end
Method · 0.95
test_stack_min
Method · 0.80
test_set_of_stacks
Method · 0.80
get_sorted_stack
Method · 0.80
test_push_on_full
Method · 0.80
test_stacks
Method · 0.80
Calls
1
Node
Class · 0.70
Tested by
7
test_hanoi
Method · 0.76
test_end_to_end
Method · 0.76
test_stack_min
Method · 0.64
test_set_of_stacks
Method · 0.64
get_sorted_stack
Method · 0.64
test_push_on_full
Method · 0.64
test_stacks
Method · 0.64