Loading tutorials
Intermediate · Mid: 15 chapters · 34 min read. States assumed prerequisites
Start readingpush, pop, peek, and is_empty, with pop and peek raising IndexError on an empty stack. You should also be comfortable with Python classes, lists, and object references.Stack interface and its two implementations, ListStack and LinkedStack, from earlier chapters. It also assumes you can read Python classes and exceptions.Stack interface and the ListStack and LinkedStack implementations from earlier chapters. Here you will see which language features let you state an ADT's interface and keep its representation privateStack, ListStack, and LinkedStack classes from the earlier chapters. Here you compare the two implementations by cost and pick one without touching client code.