Learning Outcomes
At the end of this lecture, you’ll be able to:
- Explain and trace the core operations of Stack (push, pop, top, empty).
- Describe the difference between
top
andpop
. - Implement the core operations of Stack efficiently (array based and linked base).
- Implement an array based stack that dynamically grows as more space is needed.
- Determine the cost of dynamically resizing an array-based implementation of stack.
- Describe what amortized analysis is.
- Explain the difference between amortized constant time and actual constant time.
- Elaborate on the importance of array growth factor to maintain amortized constant time push operation.
Lecture Plan
In this lecture, we'll cover the following lessons:
- Limited Access Data Structures
- Stack Abstract Data Type
- Stack Interface
- Linked Implementation of Stack⚡
- Trace Linked Implementation⚡
- LinkedStack⚡
- Array Implementation of Stack⚡
- Trace Array Implementation⚡
- ArrayStack⚡
- Dynamic ArrayStack⚡
- Dynamic ArrayStack: Cost of Resizing⚡
- Amortized Analysis
- Dynamic ArrayStack: Growth Factor⚡
Lessons marked with ⚡ contain exercise/activity.