MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / print_stack

Function print_stack

graphs/g_topological_sort.py:21–26  ·  view source on GitHub ↗
(stack, clothes)

Source from the content-addressed store, hash-verified

19
20
21def print_stack(stack, clothes):
22 order = 1
23 while stack:
24 current_clothing = stack.pop()
25 print(order, clothes[current_clothing])
26 order += 1
27
28
29def depth_first_search(u, visited, graph):

Callers 1

Calls 1

popMethod · 0.45

Tested by

no test coverage detected