Loading tutorials
Stack interface, ListStack, and LinkedStack from the earlier chapters. Save them in a file named stack_adt.py. You should also be comfortable with Python classes, exceptions, and passing functions as arguments.5 min readStack specification and its two implementations from earlier chapters. Here we look at the language features that let you write the interface down and have the language help enforce it.5 min readListStack and LinkedStack. Both keep every promise in the Stack specification, so a client cannot tell them apart by behavior. This chapter covers what separates them: how much time and memory each one uses, and how to pick between them without touching client code4 min readIntSet and stack examples from earlier chapters.6 min read