Stack Implementations
- Custom array - what are the advantages and disadvantages?
- Custom singly linked list with no dummy header - what are
the advantages and disadvantages?
- make an adapter class that uses ArrayList<E>
- make an adapter class that uses LinkedList<E>
- and many more ...
Time Complexity Analysis of Common Operations
- makeEmpty
- empty
- push
- pop
- peek
Lecture Code
Let's redo Friday's code. We will introduce a class that we define
ourselves, MyStack and an interface that we define ourselves,
StackInterface. MyStack will implement StackInterface and
use an array as the underlying data structure.