Data Structures and Algorithms
Last Modified: 1/18/2025
1 Data Structures and Algorithms Overview
1.1 Mathematical Models
Cost Models: Use some basic operations as a proxy for running time.
Operation | Frequency |
---|---|
Variable Declaration | |
Assignment Statement | |
Less than Compare | |
Equal to Compare | |
Array Access | |
Increment | to |
Key Notes:
- Estimate running time (or memory) as a function of input size
- Ignore lower order terms
- When is large, terms are negligible.
- When is small, we don’t care.