Skip to content

Instantly share code, notes, and snippets.

Avatar
😁
Coding

Oscar Bastardo OscarBastardo

😁
Coding
View GitHub Profile
View stack.py
def new_stack(size):
# our stack will be a list of [list, int] for [contents, head]
# so stack[0] is contents
# stack[1] is head
contents = [0] * size
head = 0
return [contents, head]
def is_full(stack):
# this will not work